Problem 2343 · Medium

Query Kth Smallest Trimmed Number

For each query, keep only the last trim digits of every number, sort by trimmed value and then by index, and return the kth index.

Open the interactive visualisation