Remove Digits — Programming Interview Question

Lintcode #693

Question Setup

Given a non-negative integer number represented as a string, remove k digits from the number so that the new number is the smallest possible. The given number does not contain any leading zero.

Solution Visualised