InterviewLegend

Object-Oriented Design

Alex Chen22 min readUpdated

One prompt surfaces again and again in Block pairing rounds: build an app to split a bill with friends. It sounds like a warm-up, and then the interviewer starts adding to it. Now some people only ordered appetizers. Now the tax and tip have to spread proportionally. Now show me who pays whom so the fewest dollars change hands. The algorithm never gets harder than a hash map and a sort. The grade is something else. It is whether the classes you reached for in minute three still hold up in minute twenty, after the requirement moved twice.

Block runs its coding loop as collaborative pairing in CoderPad, and the company says plainly what it wants: optimize for done. Looking things up on Google or StackOverflow is allowed and expected, because knowing how to find an API beats memorizing one. That format rewards a particular kind of object design. Not the version with seven interfaces and a factory, which Block explicitly warns against. The version where the data lives in the right place, each method does one honest thing, and a new rule slots into an existing class instead of forcing a rewrite. A simple-looking prompt here tends to go somewhere unexpected, and the classes are how you keep your footing when it does.

The Block angle
The grade is refactor-without-breaking, so model for the requirement you have and leave a seam for the one you do not. Block interviewers layer complexity deliberately and watch how your code absorbs it. A bill splitter that hardcodes an equal split has to be torn apart when shares go uneven. One that already routes every split through a single share-computing method just changes that method's body. Same requirement, a fraction of the work. You will not see the second part coming, and that is the point. Build the smallest correct thing, name where the policy lives, and when the interviewer says "now weight it by what each person ordered," you change one place and keep talking.

BlockPremium lesson · Coding round

The 3 Block problems are below.

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

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

Get the Block questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

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

Know what Block asks before you walk in.

13 coding · 5 system design · 14 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.