InterviewLegend

Graphs and Search

Alex Chen38 min readUpdated 131 real interview reports

Graphs are the single most common family in the Nutanix algorithm battery, and grids and rotated arrays sit right behind. Four problems come up again and again across reported loops, and this lesson works all four as runnable code. Spread rot through a grid one minute at a time. Count the separate landmasses in a map of ones and zeros. Turn a set of prerequisites into a valid build order, and refuse the ones that contain a loop. Find a value in a sorted array that has been rotated at some unknown pivot.

The Nutanix angle
None of these four wears a storage costume. Nutanix asks them as the standard problems they are. The DS&A round here looks like a strong software-engineering interview anywhere, and graphs lead the pack. So the preparation is plain: know the two grid traversals cold, breadth-first when the answer counts layers, depth-first when it only counts components. Know that a dependency order is a topological sort, and that the cycle case returns nothing at all, not even a partial order. Know the one comparison that makes binary search survive a rotation. The round rewards code that runs on the first awkward input the interviewer throws, so each problem below is worked to a solution that handles the empty grid, the single cell, and the missing target.
What's inside
  • 4 problems, worked step by step
  • about 38 min

Premium lessonNutanix interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · Cancel anytime

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

Know what Nutanix asks before you walk in.

11 coding · 3 system design · 15 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.