Increasing Decreasing String
A easy-tier problem at 77% community acceptance, tagged with Hash Table, String, Counting. Reported in interviews at Akuna Capital and 0 others.
Increasing Decreasing String is an easy problem with a 77% acceptance rate, but don't let that fool you into skipping it. Akuna Capital has asked this one. The trick is that you can't just sort the string and return it. You need to understand the exact pattern of alternating directions and how to reconstruct a valid sequence. It's the kind of problem that looks simple until you miss the core constraint and waste interview time on the wrong approach. If this hits your live OA and you blank on the rebuild logic, StealthCoder solves it in seconds, invisible to the proctor.
Companies that ask "Increasing Decreasing String"
Increasing Decreasing String is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.
Get StealthCoderThe problem forces you to think about order reconstruction rather than sorting. You're given a string and need to rearrange it by repeatedly picking the smallest unused character, then the largest, then smallest again. A frequency map or hash table is your tool here. Count all characters, then iterate through your alternating direction phases, decrementing counts as you build the result. Most candidates try to sort and pick greedily without tracking direction state, which fails immediately. The real work is managing the alternating picks cleanly without off-by-one errors. String and counting work together to enforce the constraint. StealthCoder is your hedge if you can't remember the exact loop pattern during the actual assessment.
Pattern tags
You know the problem.
Make sure you actually pass it.
Increasing Decreasing String recycles across companies for a reason. It's easy-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Increasing Decreasing String interview FAQ
Is Increasing Decreasing String still asked in real interviews?+
Yes. Akuna Capital includes it in their assessment data. It's an easy problem, so companies use it as a warm-up or filter to see if you can implement hash-table logic cleanly under time pressure. Don't dismiss it as too simple.
What's the trick I'm missing if my solution doesn't work?+
You must alternate direction for each pick. First pass: pick smallest unused chars in ascending order. Second pass: pick largest unused chars in descending order. Repeat until all chars are used. Most candidates forget the direction flip or the stopping condition. A frequency hash table makes this concrete.
Why can't I just sort and return the string?+
Because the problem doesn't ask for a sorted string. It asks for a specific reconstruction pattern: smallest, largest, smallest, largest, and so on. Sorting ignores the alternating constraint entirely. You need to track which characters are used and rebuild according to the direction rule.
How does this relate to hash table and string topics?+
Hash table (or frequency counter) stores character counts. String is the output structure you build by iterating through your counts in two alternating directions. Together, they encode the alternating-pick logic without nested loops or sorting overhead.
How long should this solution take to code in an interview?+
Five to ten minutes if you understand the pattern. Build a frequency map, then loop through two alternating passes, decrementing counts and appending to your result. If you're stuck longer than that, you're overthinking the direction logic. Step back and reread the constraint.
Want the actual problem statement? View "Increasing Decreasing String" on LeetCode →