Welsh lexicographical sort bloomberg time and space complexity?

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2022-11-30Added By Anonymous
Source: Link
Company: Bloomberg Role: unknown Stage: Phone Screen Location: unknown Year: unknown

Original Post:

https://leetcode.com/discuss/interview-question/682583/bloomberg-phone-order-list-in-welsh-alphabetical-order

What would be the time and space complexity?

Would time be O(NM logN) where M is the number of letters in each word?

Comments