Step Limit : 30 | |
Statement | You are given S contains only '1' - '5' surrounded by '[' and ']'. Delete all elements that satisfy the below condition: * There is a smaller digit behind it. Constraints * 1 ≤ |S| ≤ 15 Explanation of sample [314152535] xx_x_x_x__x |
Sample Input | |
Sample Output |