ebay interview coding question
Summary
I had two coding rounds at eBay. The first was an array problem about finding a 'balanced sum' subarray. The second was a binary tree problem focused on counting subtrees that meet specific criteria r...
Interview Experience
Coding: r1: Array problem — Find the maximum “balanced sum” subarray Idea: A “balanced sum” is defined as a subarray where the sum of the first half equals the sum of the second half. First, preprocess a prefix sum array. Then iterate over all possible subarray midpoints and use the prefix sums to e...


