← Morgan Stanley questions

Anagram check and alphanumeric sorting

Filed under Morgan Stanley

Given two strings, write a function to check if they are anagrams of each other in O(N) time. Additionally, sort an alphanumeric string or dataset based on character frequencies (descending) and ASCII…

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 Morgan Stanley questions

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