InterviewLegend

Class Design Problems

Alex Chen40 min readUpdated

Candidates often describe Chewy screens as focused on object-oriented programming. You get a class to build with a few methods and some rules, and it has to run. Senior candidates have built these in one-hour rounds, and a Java screen opened with a class that had to stay safe across threads.

Each problem runs as a list of method calls against your class, so a bad call has to leave the object exactly as it was.

The warehouse and parking lot classes in OO Design & Debugging use the same template. State lives on one object, and each method checks its inputs before it changes that state. Every class below adds one idea on top of that, from a heap merge to a lock.

ChewyPremium lesson · Coding round

The 3 Chewy problems are below.

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

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

Get the Chewy 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 Chewy interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Chewy interview guide

Know what Chewy asks before you walk in.

30 coding · 1 system design · 28 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.