← Microsoft questions

Bit Swap, BST to DLL, and Sorting 0s, 1s, 2s in Linked List

Filed under Microsoft

Swap consecutive odd and even positioned bits in a number, convert a BST into an in-place doubly linked list, and sort a linked list containing only 0s, 1s, and 2s in O(n) time.

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 Microsoft questions

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