Skip to content

Commit e1649d7

Browse files
committed
daily
1 parent b20507e commit e1649d7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

my-submissions/m2785.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class Solution:
2+
def sortVowels(self, s: str) -> str:
3+
s = list(s)
4+
vowels, indicies = [], []
5+
6+
for i, c in enumerate(s):
7+
if c in 'AEIOUaeiou' :
8+
vowels.append(c)
9+
indicies.append(i)
10+
11+
vowels.sort()
12+
for j, c in zip(indicies, vowels) :
13+
s[j] = c
14+
15+
return ''.join(s)

0 commit comments

Comments
 (0)