The interview lasted around 60 minutes in total.
It started with a 5-minute introduction and background discussion, followed by approximately 20 minutes of debugging exercises where I was asked to identify and fix issues in the code.
The remaining 35-40 minutes focused on a long, scenario-based coding problem that required implementing a solution while discussing the approach and trade-offs.
The session was highly interactive, with continuous questions, hints, and discussions throughout the coding process.
We want to separate users based on their popularity (number of connections). To do this, write a function that takes in the event log and a number N and returns two collections:
Example: events = [ ["CONNECT","Alice","Bob"], ["DISCONNECT","Bob","Alice"], ["CONNECT","Alice","Charlie"], ["CONNECT","Dennis","Bob"], ["CONNECT","Pam","Dennis"], ["DISCONNECT","Pam","Dennis"], ["CONNECT","Pam","Dennis"], ["CONNECT","Edward","Bob"], ["CONNECT","Dennis","Charlie"], ["CONNECT","Alice","Nicole"], ["CONNECT","Pam","Edward"], ["DISCONNECT","Dennis","Charlie"], ["CONNECT","Dennis","Edward"], ["CONNECT","Charlie","Bob"] ]
Using a target of 3 connections, the expected results are:
All test cases:
Complexity Variable: E = number of events
The following metrics were computed from 7 interview experiences for the Karat Engineer role.
Karat's interview process for their Engineer roles is fairly selective, failing a large portion of engineers who go through it.
Candidates reported having negative feelings for Karat's Engineer interview process.