Check if binary string can be sorted
Given a binary string consisting of ‘0’ & ‘1’. You can remove any subsequence in given string but can’t pick adjacent indices. Print “POSSIBLE” if string can be sorted else print “NOTPOSSIBLE”. Examples: Input: 110 Output: POSSIBLE Explanation: If we remove characters at index 1 & 3 we are left with “1” which is sorted. Input: 101001111 Output:… Read More »