InterviewLegend

Tree and Grid Problems

Alex Chen34 min readUpdated 250 real interview reports

Tree and grid problems at D. E. Shaw tend to start with a plain traversal, and the interviewer accepts it. The follow-up asks you to use the shape of the input to beat O(n), or to make a choice greedily from the leaves upward.

Trees here usually arrive as level-order lists, and grids as rows of 0s and 1s. Draw a small case before you run anything. Seven nodes or a 3x3 grid is enough to catch most slips, and it helps you name the traversal order before you write it.

Watch the recursion depth too. A skewed tree or one large region can need a stack frame per node, and Python stops near a thousand frames by default. Know how to move the search onto your own stack or queue.

D. E. ShawPremium lesson · Coding round

The 3 D. E. Shaw problems are below.

  1. A Premium questionCoding · Hard
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Medium

Each with hints, the follow-up and a tested solution.

Get the D. E. Shaw questions

$49 a year · all 100 companies · cancel anytime

From 250 D. E. Shaw reports, forum threads behind logins and write-ups in Chinese.

Had your D. E. Shaw interview?Tell us what they asked. Reviewed before it goes in, never with your name.
D. E. Shaw interview guide

Know what D. E. Shaw asks before you walk in.

32 coding · 3 system design · 16 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.