Help me in this string problem. Solution need as soon as possible. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 3

Help me in this string problem. Solution need as soon as possible.

You are given a string s. You need to find two non-empty strings a and b such that the following conditions are satisfied: Strings a and b are both subsequences of s. For each index i, character si of string s must belong to exactly one of strings a or b. String a is lexicographically minimum possible; string b may be any possible string. Given string s, print any valid a and b.

25th Oct 2021, 7:16 AM
Anikur Rahman
Anikur Rahman - avatar
5 Answers
+ 2
Where is your solution?
25th Oct 2021, 8:03 AM
A͢J
A͢J - avatar
+ 1
U r cheating in Ur exams
25th Oct 2021, 11:12 AM
Jolen Mascarenhas
0
"Solution need as soon as possible." Choice of multiple languages. I think trying to cheat in an exam is the most charitable interpretation.
26th Oct 2021, 12:04 AM
Simon Sauter
Simon Sauter - avatar
- 1
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ its in my pc. And I am trying
25th Oct 2021, 9:51 AM
Anikur Rahman
Anikur Rahman - avatar
- 1
Jolen Mascarenhas not at all. Just stuck in the problem.
25th Oct 2021, 4:22 PM
Anikur Rahman
Anikur Rahman - avatar