Increasing Decreasing String Problem
Increasing Decreasing String Problem — ExecCode Easy DSA Practice
Solve the Increasing Decreasing String problem on ExecCode. Free online easy DSA practice in Hashing. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Description You are given a string s. Your task is to compute the required answer and return the resulting string after reordering s using this algorithm. Reorder the string using the following algorithm: 1. Remove the smallest character from s and append it to the result. 2.
Examples
Input {"s": "aaaabbbbcccc"}; Output abccbaabccba. Input {"s": "rat"}; Output art
Constraints
1 <= s.length <= 500 s consists of only lowercase English letters.
Practice Increasing Decreasing String free on ExecCode. Browse DSA problems, topic map, and placement guides.