InterviewLegend

Trees, Graphs & Search

Alex Chen25 min readUpdated 415 real interview reports

Trees and binary search are the quiet middle of the PayPal loop. The object-modeling round is the differentiator, but these show up often enough that a shaky level-order walk or an off-by-one in a rotated search will end a screen that was going fine. The bar sits at a solid medium. Nothing here is exotic. What the loop checks is whether you can write a clean traversal, keep the boundary cases straight, and say why your indices are where they are.

Most of this cluster runs off one skeleton: a depth-first or breadth-first walk that remembers where it has been. A tree lets you drop the visited set, because it has no cycles and every node has one parent. A graph or a grid puts it back, since two paths can reach the same cell. Binary search is the odd one out, a different discipline, and it gets its own section below. It fails at PayPal in the places the hidden tests are built to catch: the empty input, the single element, the index one past the end.

The PayPal angle
PayPal grades the boundaries as hard as the algorithm, because a payments company treats a wrong edge case the way it treats a wrong amount. The HackerRank online assessment is known for hidden tests that target the empty tree, the single node, the off-by-one on a search window. Clear those out loud before you code and you are already ahead of most candidates; two more habits fit this round. Java is the default here, so write it in a modern style. If your screen is a Karat one, expect the rapid-fire opener to ask the Big-O of a tree or a hash lookup, then comes a single problem that layers on extensions. Narrate throughout. Going quiet is scored against you directly.

PayPalPremium lesson · Coding round

The 3 PayPal problems are below.

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

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

Get the PayPal questions

$49 a year · all 100 companies · cancel anytime

From 415 PayPal reports, forum threads behind logins and write-ups in Chinese.

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

Know what PayPal asks before you walk in.

15 coding · 5 system design · 24 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.