Question: Input: The input is a string s consisting of 1, 2, and 3. (1112321;121321>112231;121321->112312; Note: Adjacent 1 and 3 cannot be exchanged. Output the smallest


Input: The input is a string s consisting of "1", "2", and "3". (1112321;121321>112231;121321->112312; Note: Adjacent "1" and "3" cannot be exchanged. Output the smallest lexicographical string that can be obtained after performing the above operations any number of times (can be 0 times)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
