String Conversion Question | DE Shaw | SDE-2
Anonymous User
682

image
Constraint : String only has '0' and '1'

Could only think of bruteforce where we can find all permuation of the string by counting the 0 and 1 and checking for each ,if on perfoming the given operation we get the lexicographically maximum strijng.
Could only pass 6 test cases

What can be the best approch?

Comments (3)