InterviewLegend

Linked Lists

Alex Chen22 min readUpdated 309 real interview reports

Linked lists get little attention in Intuit prep, but they come up a lot. On the experienced-hire Glider OA, the single coding question has been a palindrome check on a list again and again, and an SDE-2 sitting paired a linked-list problem with an array problem. On the phone screen, a Software Engineer 2 candidate got a whole sequence in one call. Reverse a list with a loop, reverse it again with recursion, find the middle, then reverse it in groups of k.

All of those use the same three techniques. A trailing pointer flips links as you walk the list. A fast pointer that moves two nodes for every one the slow pointer moves finds the middle. And a dummy node in front of the head removes the special case for the first group. Once you know these, the four problems become short programs, and what's left is the edge cases. On a list those are lengths, so think about zero nodes, one node, an odd middle and a tail shorter than k.

The Intuit angle
Intuit runs your list code against tests you can't see. Glider checks the OA submission against hidden tests, and the phone screen that went from reversal to groups of k wanted every step tested before moving on. Say the lengths out loud before you write a pointer: empty, single node, two nodes, odd and even. Then trace your loop on the two-node list by hand, since that's where a dropped next link or a lost head hides. When the iterative version passes in compiling Java, expect a request for the recursive one, and have its stack cost ready.

IntuitPremium lesson · Coding round

The 3 Intuit problems are below.

  1. A Premium questionCoding · Medium · Signature problem
  2. A Premium questionCoding · Hard
  3. A Premium questionCoding · Easy

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

Get the Intuit questions

$49 a year · all 100 companies · cancel anytime

From 309 Intuit reports, forum threads behind logins and write-ups in Chinese.

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

Know what Intuit asks before you walk in.

28 coding · 5 system design · 21 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.