Level: Junior-Level
Round: Online Assessment · Type: Coding · Difficulty: 5/10 · Duration: 60 min · Interviewer: Neutral
Topics: Rate Limiter
Location: San Francisco Bay Area
Interview date: 2025-08-31
I encountered two questions during the online assessment. The first question involved building a rate limiter to control user requests. The second question focused on forming teams from a group of students with different subject proficiencies.
I participated in an online assessment for IBM.
Question 1:
The first question involved building a rate limiter. The prompt was:
"You are building a rate limiter that controls how many requests a user can make over time. Given a list of requests, where each request has a user ID and a timestamp, determine if the request should be allowed. A request is allowed only if the user has made fewer than k requests in the past t-second sliding window.
The function getRequests will take four inputs:
The function should return an array of integers, with the ith element being 1 if the i request is allowed; otherwise, it should be 0.
Note: If a request is not allowed, it is not counted for future rate limit counting."
Question 2:
The second question focused on forming teams with students having different subject skills. The prompt was:
"The School of Languages and Science offers five subjects: Physics, Chemistry, Math, Botany, and Zoology. Each student is proficient in one subject. The students' skills are represented by a string of characters, with each character being one of the following: p, c, m, b, or z, indicating their respective skills.
Given a list of students' skills, calculate the total number of possible teams that meet the following conditions: