Sunday common C++ interview problem: Lexicographically minimum string
Given a string and an integer k, you can repeatedly apply the following operation:
- take one of the first k characters and append it to the end of the string
Return the lexicographically smallest string you can create this way.
Solve it yourself: https://compiler-explorer.com/z/9h7nMT7Tq
Solution: https://compiler-explorer.com/z/anez5E5dP