Algorithms icon indicating copy to clipboard operation
Algorithms copied to clipboard

[SSOC'23] reverse vowels in a string

Open Nikita06211 opened this issue 2 years ago • 6 comments

Is your feature request related to a problem? Please describe. Given a string s, reverse only all the vowels in the string and return it.

example: Input: s = "hello" Output: "holle"

Describe the solution you'd like The solution will be in c++.

please assign me this issue under ssoc'23.

Nikita06211 avatar Jun 08 '23 11:06 Nikita06211

please assign this issue i have the code in c,c++,java,python

Rahul-Talari avatar Jun 08 '23 11:06 Rahul-Talari

@Kumar-laxmi pls assign me, I am writing the BF code for this

string reverseVowels(string s) {

unordered_set<char> vowels = {'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'};

int start = 0, end = s.length() - 1;

while (start < end) {
    if (vowels.count(s[start]) == 0) {
        start++;
    } else if (vowels.count(s[end]) == 0) {
        end--;
    } else {
        swap(s[start], s[end]);
        start++;
        end--;
    }
}

return s;

}

Also, I can Implement in more than 3-4 languages like C,Python , Js

pls assign me @Kumar-laxmi

SKSADIRUDDIN avatar Jun 08 '23 12:06 SKSADIRUDDIN

@Kumar-laxmi sir I can code it using c, c++ . Kindly assign me this task.

Soumya6Tiwari avatar Jun 08 '23 15:06 Soumya6Tiwari

@Kumar-laxmi I would like to contribute to this issue. Please assign me this issue.

Ashutosh-0506 avatar Jun 15 '23 20:06 Ashutosh-0506

@Kumar-laxmi please assign me this Issue I would like to contribute

tuhinsunny avatar Jun 18 '23 21:06 tuhinsunny

Please assign me

Geeks-Arpan avatar Aug 27 '23 11:08 Geeks-Arpan

Stale issue message

github-actions[bot] avatar Jun 12 '24 16:06 github-actions[bot]