← Microsoft questions

Longest Even Length Substring

Filed under Microsoft

Given a string of digits, find the length of the longest even-length substring such that the sum of the digits in the left half equals the sum of the digits in the right half. Return 0 if no such…

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.