Some Coding Challenges: Extract a minimal possible Number from a String.
2 min readMar 25, 2024
The task is to extract from a given string of digits, by removing a fixed number of elements, a sub-string which constitutes the minimal possible integer.
So for instance given 2345421
with an allowed removal count of 4
, the minimum number we can obtain is 221
.