Mastering Coinbase's Rigorous Software Engineer Interview: Tackling Complex Array Challenges

coinbase | Software Engineer | Interview Experience

Interview Date: Not specified
Result: Not specified
Difficulty: Not specified

Interview Process

The interview process at Coinbase was quite lengthy. About a month and a half ago, I was contacted by their HR on LinkedIn. During the HR call, the interview process and package were clearly explained. After completing a personality test, an IQ test, and an online assessment (OA), I finally reached the video interview (VO) stage.

The VO consisted of two technical rounds (with different names but similar content) and one HR round. Both technical rounds were conducted on the same day, with a one-hour break in between.

Technical Questions

VO1: Food Delivery System

  • Level 1: Given a user’s location and different restaurants’ food (the same food can be sold by different restaurants at different prices), write two functions: one to find the cheapest price for a given item (e.g., Burger) and another to find the nearest restaurant.
  • Level 2: The data format differs from Level 1; it only provides a list of orders containing order numbers, food items, total price (quantity × unit price), and timestamps. Write a function to calculate the total number of orders, total sales, and average price per order within a given time range (start, end).
  • Level 3: Based on Level 2, find the Top K Orders with the highest sales. The simplest method is to sort the orders by sales amount and return the top K. However, the interviewer preferred using a max heap to solve this.

VO2: Interleave Iterator

  • Level 1: Interleave Posts Feed. No need to write in the form of an Iterator; given a 2D array, traverse the elements in an interleaved manner. For example, input [[1,2,3], [6], [7,8]] should output [1,6,7,2,8,3].
  • Level 2: Iterator interface. Write an iterator interface with hasNext and getNext methods. Implement two iterator classes that inherit from this interface: one that converts a list into an iterator and another that implements a range iterator.
  • Level 3: Combine Levels 1 and 2 to implement Level 1 in the form of an Iterator.

The entire interview was very tight on time.

Tips & Insights

I was unsure about my performance and whether I would pass.