Leaderboard
Showing:
Handle Score
@Ibrahim Nash 6381
@blackshadows 6329
@mb1973 5388
@Quandray 5231
@akhayrutdinov 5111
@saiujwal13083 4510
@sanjay05 3762
@marius_valentin_dragoi 3522
@sushant_a 3459
@verma_ji 3357
@KshamaGupta 3318
Complete Leaderboard
String Subsequence Game
Basic Accuracy: 35.08% Submissions: 66 Points: 1

Given a string return all unique possible subsequences which start with vowel and end with consonant. A String is a subsequence of a given String, that is generated by deleting some character of a given string without changing its order.
NOTE: Return all the unique subsequences in lexicographically sorted order. 


Example 1:

Input: S = "abc"
Output: "ab", "ac", "abc" 
Explanation: "ab", "ac", "abc" are 
the all possible subsequences which 
start with vowel and end with consonant.

Example 2:

Input: S = "aab"
Output: "ab", "aab"
Explanation: "ab", "aab" are the all 
possible subsequences which start 
with vowel and end with consonant.


Your Task:  
You dont need to read input or print anything. Complete the function allPossileSubsequences() which takes S as input parameter and returns all possible subsequences which start with vowel and end with consonant.

Expected Time Complexity: O(n*logn*2n)

Expected Auxiliary Space: O(2n)

Constraints:
1<= |S| <=18

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.

String Subsequence Game

Output Window