NewThe Learning module is now liveSee what's new
avatar
nehadesai1203Oct 19, 2026

Square phone screen, the transaction network one

Interview Experiences
block

Square phone screen, the transaction network one

Had my Square phone screen last week. One hour on CoderPad. Still waiting to hear back.

One problem split into 3 parts, and they only showed the next part once your tests passed. Part 1 was recording transactions between customers, so basically building an adjacency list. Part 2: given a customer id, return everyone in their network, meaning anyone connected through any chain of transactions. I did BFS with a visited set. Part 3 capped it at k degrees of separation, so I switched to level by level BFS and stopped at depth k.

None of the algo stuff was hard. He cared way more about the tests than the BFS itself tbh, and I burned a lot of time writing them. Barely finished part 3.

13602.1k

Replies (0)

No replies yet — start the conversation!