โ† Josh Technology questions

Smallest number matching an I/D increase-decrease pattern

Filed under Josh Technology

The question

Given a string of only I and D (increasing/decreasing), produce the smallest number with non-repeating digits greater than zero that follows the pattern; print a message for an empty string and another when length exceeds 8. Example IDIDI gives 132546.

No write-up yet. Related questions below have one.

Related Josh Technology questions

Collected from public candidate posts and coding forums. Updated Nov 2026.