← Microsoft questions

Maximum subarray, Kth largest, zero rearrangement, and hybrid sorting

Filed under Microsoft

Solve four distinct sub-problems: 1) Find maximum subarray sum (Kadane's). 2) Find Kth largest element in a BST. 3) Rearrange an array in-place to move zeros to the front while preserving relative…

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.