ByteDance interview question

Interviewer asked to sort numbers lexicographically. That problem can be found in leetcode.

Interview Answer

Anonymous

19 Jan 2021

I approached with trie. But there is an optimized solution for this problem.