Level: Unknown Level
Round: Phone Screen · Type: Coding · Difficulty: 6/10 · Duration: 60 min · Interviewer: Unfriendly
Topics: Object-Oriented Design, Comparison Algorithms
Location: San Francisco Bay Area
Interview date: 2025-12-22
Got offer: False
I interviewed with a person who was not previously mentioned on standard interview prep sources. I made some mistakes initially but corrected them after discovering errors in the test cases. The questions I encountered were:
add_type(type_id [string], matches_function [function]) that allows customization of the comparison order.I also had to implement the main function evaluate with an additional parameter evaluation_orders [arrays of String].
The interview questions were:
add_type that would accept a type_id (string) and a matches_function (function). The purpose of this function was to allow the user to define a custom comparison order.evaluate needed to be extended to accept an additional parameter called evaluation_orders, which would be an array of strings representing the evaluation order.My Approach:
For the first question, I started off in the wrong direction. I was not guided by the interviewer initially. Only after I completed the code and realized that the test cases were failing did I correct my mistakes.
For the second part, I focused on creating a flexible design that would allow users to easily add and configure new comparison rules.