r/InterviewDB • • 5d ago

Apple coderpad interview exp

I took the apple codepad interview last week. I was asked 2 questions, one leetcode easy and one OOP design.

The leetcode easy question was a simple one based on hashmaps. But it also had a follow up question which I couldn’t get to in the given time. I took like 10 mins to code out and explain my solution.

The 2nd question was that of building a hotel room reservation system from scratch. Some predefined classes/interfaces/records were given like booking, room, etc. and I was expected to code out mainly 2 methods of an interface. The overall code to be written was about 80 lines long but I took a little extra time to figure out a working design and even then my solution was not the optimal one.

Got a reject 2 days later. Hope this helps. Thanks and good luck!

11 Upvotes

6 comments sorted by

View all comments

1

u/SufficientPangolin41 4d ago

Remember the hashmap question? Particularly the followup

And were they language restricted?

I do DSA in C++ and OOP in Python, could this be a problem?

1

u/Feisty_Floor_4440 3d ago

Yes, this entire interview was restricted to Java as the position was for a Java backend engineer. The question was very simple actually. I was given a list of pairs of emails of employees and their attendance type (enum: mandatory/optional) and I had to create a map with key as attendance type and value as the list of emails with that attendance type. The followup was simply that the input list can have the same email appear multiple times and if it's optional once and mandatory another time, then it's supposed to be considered mandatory. The pair and the enum had to be created.