← FactSet questions

Smallest number by shuffling k digits

Filed under FactSet

Given a string N representing a large number and an integer k, you are allowed to choose exactly k indices in the string and rearrange (shuffle) the digits at those indices to any order. Return the…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related FactSet questions

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