0 day streak
Anonymous · shared experience20 Sept 2025 · 8 views

Instacart: Pivot transaction rows by date without any date libraries

Interview question #Instacart DSA / coding

Problem. In the second coding round, the task was a data pivot: take transaction records and reshape them so values are grouped and laid out by date. The candidate called it not too hard overall.

The twist. The Java environment did not allow importing date or time packages, so comparing and ordering dates had to be done by hand. The candidate found that, for the date strings given, plain lexicographic string comparison sorted them correctly and was enough to pass, which saved writing a manual date parser.

Caveat. That shortcut only works when dates are in a zero-padded, year-first format. Confirm the format with the interviewer before relying on it.

Context. The same loop had a shopper-delivery coding round with two linked questions, a catalog system design where the interviewer focused on the API and database schema, and a behavioral round. The candidate said the whole loop matched the one they took a year earlier, question for question, and they passed to team matching.

0 comments

Comments 0

No comments yet. Ask the author something, or add what happened in your own round.