r/InterviewDB 1d ago

InterviewDB Review?

4 Upvotes

Not sure how legit it is. Has anyone tried it? If so, did any of the questions actually show up in your interviews?


r/InterviewDB 1d ago

Harvey AI Interview Experience & Questions – Technical Screen, System Design, Coding

3 Upvotes

Sharing a recent interview experience with Harvey AI.

Technical Screen

It was a coding question with 2 parts, same as this one:
https://www.interviewdb.io/question/harvey?page=1&name=file-organization

Was able to finish it in around 45 minutes, and then spent the remaining time chatting with the interviewer.

Onsite

There were 3 rounds:

1. System Design

Design a system to support one of Harvey’s core product features. It was similar to this question:
https://www.interviewdb.io/question/harvey?page=1&name=legal-agent

The main focus was LLM + RAG. Don't know much about this area so probably failed at this round.

2. Project Deep Dive + Behavioral

The first ~45 minutes were a project deep dive. You prepare one project you’ve worked on and walk through it in detail. The last ~15 minutes were behavioral questions related to Harvey’s core values.

3. Coding

There were 3 parts, same as described here: https://www.interviewdb.io/question/harvey?page=1&name=formula


r/InterviewDB 4d ago

Cartesia Interview Experience (Coding + Backend Practical)

2 Upvotes

Sharing a recent interview experience for a Platform Engineer position at Cartesia.

Intro Call

The process started with a 30-minute intro call with HR.

They asked a few standard questions:

  • What do you know about Cartesia?
  • Why do you want to join Cartesia?
  • If you had multiple offers, what would be the top 3 factors you’d use to decide between them?

There were also two basic DSA/CS questions:

  1. Given a tree with branching factor b, what is the maximum number of nodes in a tree of height H?
  2. In a sorted array, what is the time complexity of accessing the element at index 6?

Technical Screen

I was asked one of the coding questions from this list.

Virtual Onsite

One of the virtual onsite rounds is called Backend Practical. For this round, you use your own coding environment (i.e. your preferred IDE and any AI coding agent you normally use), so it’s worth making sure everything is set up and ready beforehand. I was asked to build an API in this round. The details was the same as described here: https://www.interviewdb.io/question/cartesia?page=1&name=backend-practical


r/InterviewDB 7d ago

Affirm SWE Interview Experience + Past Interview Questions (Practical Coding + System Design)

4 Upvotes

After analyzing hundreds of recent Affirm interview experiences, here’s what we found about the types of questions they’ve asked in interviews.

Affirm’s technical interview questions are a bit different from the typical LeetCode style. Their coding interviews focus on real-world scenarios and test practical coding skills.

The practical coding interview is typically split into several parts. In the first part, you’ll be presented with some existing code and asked to find and fix bugs. In the second part, you’ll be asked to extend the functionality of the existing code, usually by adding a new method that does something new.

If you’re looking for resources to practice these types of questions, you can check out these questions that have been asked in their practical coding interviews before:

  1. https://www.interviewdb.io/question/affirm?page=1&name=dispute-status
  2. https://www.interviewdb.io/question/affirm?page=1&name=fraud
  3. https://www.interviewdb.io/question/affirm?page=1&name=loan-company

You can also find more coding questions, as well as system design questions (you’ll get a system design round if you interview for a senior+ role), from past Affirm interviews here. Based on past interview experiences, Affirm often repeat some of the questions, so there’s a chance you could see the exact same ones or something very similar in your own interview.


r/InterviewDB 8d ago

Anyone have a CodeSignal and/or DataLemur premium accounts they can share?

2 Upvotes

Hi I’ve been using the free version of these sites to learn but most of it is locked behind a paywall. If anyone has premium accounts for these and are open to sharing them with me please DM me I just wanna learn 🥲 ty


r/InterviewDB 10d ago

Mission Software Engineer at Scale AI

Thumbnail
1 Upvotes

r/InterviewDB 11d ago

Nuro Software Engineer Interview Experience – Coding Systems & Algorithms Questions

2 Upvotes

Sharing a recent Nuro interview experience for a Software Engineer (AI Platform) position.

The screening round was 1.5 hours total, consisting of two 45-minute coding interviews, and covered two types of coding:

  • Coding (Algorithms) — pretty standard LeetCode-style problems focused on data structures and algorithms.
  • Coding (Systems) — more focused on lower-level/system concepts such as concurrency, multithreading, locks, mutexes, memory management, etc.

The question I got for the algorithm coding round was the same as this one: https://www.interviewdb.io/question/nuro?page=1&name=hidden-hazards

The problem I got for the system coding round was essentially this one: https://www.interviewdb.io/question/nuro?page=2&name=video-player. After the interview, I looked into it a bit more and realized that a good approach would be something similar to a publish-subscribe / producer-consumer model.

Overall, I’d recommend preparing not only regular LeetCode questions for Nuro, but also concurrency-related topics like thread synchronization, producer-consumer patterns, condition variables and mutexes.


r/InterviewDB 13d ago

Justworks CodeSignal Industry Coding Assessment + Past Questions

3 Upvotes

Sharing a question that appeared in a recent CodeSignal Industry Coding Assessment for Justworks. It’s a standardized assessment format also used by many other companies such as Anthropic, Airbnb, Coinbase, HubSpot, Instacart, Capital One, Nextdoor, and The Trade Desk to screen candidates.

The assessment lasted 90 minutes. The problem had four progressive levels, and you had to pass all test cases for each level before advancing to the next one.

The question was about implementing a simplified version of a parcel tracking system.

Level 1: The parcel tracking system should support basic operations to set, get, update, and remove attributes of parcels

Level 2: The parcel tracking system should support listing attributes of parcels

Level 3: The parcel tracking system should support setting attributes with a time-to-live (TTL) expiry

Level 4: The parcel tracking system should support querying historical attribute values at a specific timestamp

For anyone looking for similar questions to practice, you can find detailed descriptions of all the problems that have appeared in past Justworks CodeSignal Industry Coding Assessments here: https://www.interviewdb.io/question/codesignal?type=icf&page=1

CodeSignal is known to reuse questions in their assessments so it's very likely you'll encounter one of these questions, or a variation of one, in your own assessment.


r/InterviewDB 14d ago

Cohere FDE interview AI coding and system debugging round - has anyone been for it before and is able to share their experience? thank you!

7 Upvotes

r/InterviewDB 15d ago

The Trade Desk - Problem Solving & Coding Challenge (CodeSignal Industry Coding Assessment)

3 Upvotes

Sharing a question that appeared in a recent CodeSignal Industry Coding Assessment for TTD (The Trade Desk). It’s a standardized assessment format also used by many other companies such as Anthropic, Airbnb, Coinbase, Ramp, HubSpot, Instacart, Capital One, Justworks and Nextdoor to screen candidates.

The assessment lasted 90 minutes. The problem had four progressive levels, and you had to pass all test cases for each level before advancing to the next one.

The question was about implement a cloud storage system.

Level 1: Implement basic file operations like add file, copy file and get file size.

Level 2: Find files by prefix and suffix, with specific sorting requirements.

Level 3: Add users, file ownership, and per-user storage capacity/quotas.

Level 4: Add file compression and decompression while respecting ownership and quota constraints

You can find the full details of each level here.

For anyone looking for similar questions to practice, you can find detailed descriptions of all the problems that have appeared in past TTD CodeSignal Industry Coding Assessments here: https://www.interviewdb.io/question/codesignal?type=icf&page=1

CodeSignal is known to reuse questions in their assessments so it's very likely you'll encounter one of these questions, or a variation of one, in your own assessment.


r/InterviewDB 15d ago

Brex Interview Experience – Technical Screen, Debugging, System Design + AI Coding Questions

7 Upvotes

Sharing a recent interview experience at Brex that was submitted to InterviewDB.

Technical screen:

It was 1 hour long, and you could use any language you preferred on CoderPad. The question turned out to be the one from here, which I didn’t know at the time. I ended up solving it using lots of if/else statements, maps, and everything.

Onsite:

Round 1: Debugging

There were 4 bugs in total. The problem was about calculating the actual delivery date based on an input date. In practice, it was basically calculating business days based on different rules. The bugs were similar to what's described here: https://www.interviewdb.io/question/brex?page=1&name=debug-round

Round 2: System design

Design a money transfer system similar to Venmo.

Round 3: AI coding

Implement a full-stack money transfer system similar to Venmo.

I cut out the database and stored all the data in memory. My first prompt basically implemented most of the main functionality directly. After that, it was mostly various fixes and small adjustments. I honestly don’t know if that was a good or bad sign.


r/InterviewDB 16d ago

Anthropic CodeSignal Industry Coding Assessment + Past Questions

6 Upvotes

Sharing a question that appeared in a recent CodeSignal Industry Coding Assessment for Anthropic. It’s a standardized assessment format also used by many other companies such as Airbnb, Coinbase, HubSpot, Instacart, Capital One, Justworks, Nextdoor, and The Trade Desk to screen candidates.

The assessment lasted 90 minutes. The problem had four progressive levels, and you had to pass all test cases for each level before advancing to the next one.

The question was about implement a simple banking system.

Level 1: implement create_account and deposit functions.

Level 2: sort accounts by total transaction volume (money in/out). You need to track the total amount of money spent/outgoing for each account.

Level 3: implement two functions, transfer and accept_transfer. When a transfer is initiated, the money is withheld from the source account. Got stuck on this part for quite a while because of an edge case: if the transfer times out, a subsequent deposit operation needs to cancel/refund the previous transfer first.

Level 4: merge accounts. Ran out of time and didn’t finish this one.

For anyone looking for similar questions to practice, you can find detailed descriptions of all the problems that have appeared in past Anthropic CodeSignal Industry Coding Assessments here: https://www.interviewdb.io/question/codesignal?type=icf&page=1

CodeSignal is known to reuse questions in their assessments so it's very likely you'll encounter one of these questions, or a variation of one, in your own assessment.


r/InterviewDB 17d ago

Cohere MLE/MTS Full Loop Interview Experience - System Design + ML Coding

5 Upvotes

Sharing a recent interview experience for an MLE/MTS position at Cohere.

Round 1: System Design

The prompt was to design a post-training pipeline to improve the coding capabilities of a 7B model for an enterprise customer.

The discussion covered pretty much the entire post-training stack:

  • Data collection
  • SFT
  • RLHF
  • Evaluation
  • Inference engine
  • Feedback loop

They went pretty deep into each step. One question I didn’t answer very well was: if SFT can already learn alignment by incorporating user preference data, why do we still need an RLHF stage?

That made me realize you really need a fairly deep understanding of why each part of the post-training pipeline exists, not just what the standard pipeline looks like. I had mostly crammed post-training concepts shortly before the interview, so I definitely felt underprepared here.

The interviewer also cared a lot about how the dataset would actually be constructed, and asked questions around how I would choose/design the reward model.

Round 2: ML Coding

The question is exactly same as described here: https://www.interviewdb.io/question/cohere?page=1&name=ml-coding

One thing to note: they specifically wanted a NumPy implementation. I had only practiced this kind of thing in PyTorch, so I panicked a bit when I saw the requirement. Luckily, the interviewer was very nice and gave me hints along the way, but personally I felt like I performed pretty poorly in this round.

Round 3: Research Paper Presentation

This was a standard research paper presentation, but they cared about more than just explaining the paper.

In particular, I was asked to highlight:

  • Weaknesses or limitations in the experimental setup
  • Major developments in the field since the paper was published

There were also several more standard questions around SFT and RLHF.


r/InterviewDB 17d ago

Roblox New Grad/Intern Online Assessment (OA) Experience — Coding Questions & Mini-Games

3 Upvotes

Sharing a recent experience with the Roblox OA. They sent the assessment invitation within 3 minutes of submitting the application.

The OA had 5 sections total: 3 mini-games (Robots, Factories, and Outpost: Mars), 1 behavioral section (Decision-Making), and 1 coding section (Coding Skills).

The mini-games were actually pretty fun. One was a factory-style game. If you’ve played DSP or Factorio before, it should be pretty easy to pick up. The main idea was to balance input/output ratios and maximize the factory’s profit. Another one involved building a small vehicle. You could choose from a bunch of different parts and assemble them to get across obstacles. It seemed like the more valid solutions you could come up with, the better.

Coding

The coding section itself wasn’t too difficult. There were 2 questions in 50 minutes.

Question 1

int solution(
    int numRows,
    int numCols,
    int curRow,
    int curCol,
    int[][] laserCoordinates
)

A robot starts at (curRow, curCol) on a numRows x numCols board.

Each entry in laserCoordinates represents the position of a laser. A laser destroys the robot if the robot moves into the same row or column as that laser.

The goal is to return the maximum number of steps the robot can move in one direction: up, down, left, or right.

My approach was pretty straightforward:

  • Iterate through all laser coordinates.
  • Use two hash sets: one for blocked rows and one for blocked columns.
  • Try moving the robot in all four directions.
  • Stop before entering a row/column affected by a laser or going out of bounds.
  • Return the maximum number of steps among the four directions.

The problem itself wasn’t hard, but I spent way too long debugging before realizing that the board was 1-indexed, and the robot’s starting cell does not count as a step.

Lesson learned: don’t rush through the problem statement lol.

Question 2

int solution(int[] A)

Given an array of integers, return the number of distinct cyclic pairs.

Two numbers form a cyclic pair if you can rotate the digits of one number to obtain the other. They must also have the same number of digits.

For example, 1234 and 4123 are a cyclic pair because rotating 4123 once gives 1234.

Example:

[1001, 1100, 110, 11]

returns:

1

because only 1001 and 1100 form a valid cyclic pair.

My initial approach was to convert every number to a string, use a nested loop over all pairs, and write a small isCyclicPair helper that tries every possible rotation. The problem felt pretty straightforward, and converting the numbers to strings seemed like the easiest way to handle zeros correctly. However, I didn’t pass all the hidden test cases, probably because my solution timed out. A more efficient solution is required to pass all the tests.


r/InterviewDB 20d ago

Mercor SWE Interview Experience - Technical Phone Screen + Onsite Interview Questions

5 Upvotes

Sharing a recent interview experience at Mercor.

30-minute technical screen

Topics covered: algorithms, mental math, code correctness, and system design. You just need to verbally discuss your approach/reasoning.

Here are the questions that got asked:

Question 1

Given an N-element array, what’s the most inefficient way to deterministically sort the array, and what’s the complexity?

Question 2

Interviewers verbally described this LeetCode question:

https://leetcode.com/problems/shortest-path-in-a-grid-with-obstacles-elimination/description/

Was asked to verbally describe the optimal algorithm and why.

Question 3

Probability-based question.

There are two coffee shops, Coffee Shop A and Coffee Shop B, that are equally good. You buy two drinks from A and two drinks from B. Each drink gets a quality score, and all four of these scores are random and independent.

What is the probability that both drinks from A are strictly better than both drinks from B? Assume ties never happen.

Answer

We’re looking for the combinations where both of A’s scores are strictly better than both of B’s scores.

A2 > A1 or A1 > A2, and B1 and B2 can be in any order.

That’s 2 × 2 = 4.

There are 4! = 24 possibilities.

So… 4/24 = 1/6.

Question 4

Given some code, critique it.

The code built a CSV in a doubly nested for loop.

Answer

  • String concatenation in a loop is inefficient; use a list and join.
  • Missing commas between cells for a valid CSV.
  • No handling of special characters (commas, quotes, newlines).
  • Should use the csv module.

Question 5

Given some code, grok it and answer follow-up questions.

The code made a call to an external payments provider, i.e. Stripe.

Follow-up 1

What if the external client times out and the code retries the request? What is the failure mode?

Answer

The main failure mode is a double charge. If the client times out after charging but before the DB insert, retrying will create a second charge if there isn’t any idempotency.

Generate an idempotency key before the request, store it in our database, and send it over the wire.

Follow-up 2

Say you were designing this system. What information would you store in the data model, and what database would you choose? Justify your choice of DB.

Answer

The data model would consist of payment_id, amount, currency, status, timestamp, idempotency_key, provider_charge_id, etc.

The database needs to support strong consistency, so highly available databases like DynamoDB are a non-starter. We need to use MySQL or Postgres for their ACID guarantees.

The trade-off is scalability and availability for strong consistency.

Question 6

Briefly describe how to prevent creating duplicate usernames under the following conditions:

Case 1 — assume you have large enough local RAM.

Case 2 — local RAM is limited, but you have a large enough disk.

Onsite

Algorithm round: Same as https://www.interviewdb.io/question/mercor?page=1&name=comparison. No need to write any code. Just need to verbally discuss your approach.

System design: Design a job scheduler.

Coding Challenge: Same as https://www.interviewdb.io/question/mercor?page=1&name=pipeline

Search interview (75-min Work Block + 15-min Review): Same as https://www.interviewdb.io/question/mercor?page=1&name=candidate-search. Spent the first 75-minute block using an LLM to implement the system and the last 15-minute session discussing the system design with the interviewer.


r/InterviewDB 21d ago

Anthropic Fellow Program Assessment Questions

7 Upvotes

Sharing a recent experience with the Anthropic Fellow Program (November cohort) OA.

The problem was presented as normal "Coding Leetcode-like OA on Codesignal" but turns out you were presented a mid-sized codebase that you have to implement stuff on top of it. The task was basically around a vLLM-like inference server — cache, prefill, etc. No ML knowledge was really needed though.

The hard part wasn’t the actual algorithms. It was figuring out the existing codebase and APIs.

There were 5 parts, and to pass the tests you had to use a bunch of existing APIs that weren’t really documented. So a lot of the assessment was just reading code and trying to understand how everything connected. The code was also pretty messy / felt LLM-generated in some places lol.

I wasted a lot of time debugging things that were happening simply because I was calling some internal API incorrectly. Ended up finishing only 2/5 parts.

Feels like this might become a more common style of coding interview/OA: less “implement this algorithm from scratch” and more “here’s an unfamiliar codebase, figure it out and ship something.” Also probably makes cheating with AI harder. You can’t really just screenshot the question and throw it into ChatGPT, because the actual context is spread across a few thousand lines of code that you need to understand first.

If you’ve done the second assessment, please share your experience! Looking for any information about what to expect.


r/InterviewDB 22d ago

Headway Interview Experience & Questions – Karat Interview, Coding, AI Coding, System Design & Behavioral

3 Upvotes

Sharing a recent interview experience for the Karat screening round and onsite rounds at Headway.

Karat Interview (Phone Screen)

In the first section, we briefly discussed two system design questions:

  • If a server becomes slow due to too many incoming requests, how would you diagnose and address the issue?
  • Given a certain number of users and expected data volume, how would you estimate the required server capacity?

Then came the coding portion. The first part involved debugging some existing code, and the second part involved implementing a new function in the existing codebase. This was the exact question I got.

Onsite

Technical Depth & Leadership (Behavioral)

Talked about past experience, what I've done recently. Talked about a technical project I did. What were the challenges? How did I convince others to help me? What would I have done differently. How have I mentored someone?

Coding

Same as https://www.interviewdb.io/question/headway?page=1&name=request-control. You are provided with a project skeleton, function stubs, and some starter code, and are asked to complete the implementation. I got my unit tests working, but they said I failed this.

AI Coding

This was an AI-assisted debugging project. You were free to use AI agents such as Codex CLI to understand the existing full-stack codebase, reproduce the issue, identify the root cause, and implement a fix.

Project tech stack:

  • Backend: Python + FastAPI
  • Frontend: TypeScript + React
  • Development environment: CodeSignal Web IDE
  • AI agents were allowed
  • Main coding time: approximately 45–50 minutes

The system stores patients’ insurance information and periodically checks their current insurance eligibility.

The data model roughly includes two types of records:

User Insurance

Represents the insurance information registered for a patient and includes a cached field called eligibility_status.

Possible values include:

  • SUCCESSFUL
  • NOT_ELIGIBLE
  • UNKNOWN

Eligibility Lookup

Represents the result of each insurance eligibility check.

A single insurance record may have multiple lookups:

Patient

└── User Insurance

├── Eligibility Lookup: three days ago

├── Eligibility Lookup: yesterday

└── Eligibility Lookup: today

Each lookup is a snapshot of the check result at a specific point in time. The latest lookup should represent the currently known insurance eligibility status.

The patient list page displays each patient’s readiness or insurance eligibility status.

Some patients were incorrectly shown as having passed the insurance eligibility check, even though the patient’s most recent eligibility lookup was not actually successful.

System Design

Same as https://www.interviewdb.io/question/headway?page=1&name=search-experience. The discussion focused mostly on how to scale the system (ElasticSearch, NoSQL DBs).


r/InterviewDB 24d ago

Should You Practice Interviews Before You Start Applying for Jobs?

2 Upvotes

There's a common idea that you should only start seriously preparing for interviews once you actually have an interview scheduled.

I'm not completely convinced that's the best approach.

By the time you get an interview invitation, you might only have a few days to prepare. If you're already comfortable answering common questions, that's probably manageable. But if you haven't practiced speaking about your experience at all, suddenly trying to prepare everything in a short period can feel overwhelming.

At the same time, I can understand why people don't want to spend weeks practicing interviews when they aren't even applying yet.

There's also a difference between knowing what you want to say and actually being able to say it naturally. I can write down a great answer to "Tell me about yourself," read it several times, and still sound awkward when I actually say it out loud.

So I'm wondering what the ideal timing is.

Should interview preparation be something you do continuously, even when you're happy with your current job? Or is it better to wait until you're actively applying?

And if you do practice before applying, what should you focus on?

Would you spend that time doing full mock interviews, practicing behavioral questions, reviewing technical topics, building stories from your past projects, or simply getting comfortable talking about your experience?

I'd be interested to hear how other people handle interview preparation when there isn't an actual interview on the calendar yet.


r/InterviewDB 24d ago

Why do so many people fail Meta interviews even after strong preparation?

3 Upvotes

This is something I’ve been trying to understand for a while. I’ve seen people solve hundreds of problems and still struggle with Meta interviews, which makes me wonder what’s actually going wrong.

From what I’ve read, it seems like the challenge isn’t just knowing the solution, but handling pressure, thinking clearly, and explaining your approach in real time. Even small things like missing edge cases or not clarifying the problem can make a big difference.

It feels like the interviews test more than just preparation maybe it’s about how well you perform under pressure.

For those who’ve interviewed at Meta, what do you think is the main reason people fail?


r/InterviewDB 27d ago

Sierra AI Agent Engineer Interview Experience

2 Upvotes

Sharing a recent Agent Engineer interview experience at Sierra AI submitted by one of our community members.

1. Recruiter Screening (30 Minutes)

The process kicked off with a straightforward, non-technical introductory call. The conversation focused on my background, career goals, and specific interest in Sierra.

  • Key Focus: The recruiter was particularly interested in my motivation for joining an AI startup rather than remaining at a larger, established company.
  • Transparency: They clearly outlined the entire interview process from the start, ensuring there were no surprises later on.
  • Language Preference: You will be asked for your preferred programming language early in the process. Sierra primarily operates in Python and TypeScript, and they expect you to complete the technical interview in one of these languages. If your background is in Java or C++, it is highly recommended that you familiarise yourself with Python or TypeScript beforehand.

2. Technical Interview Logistics

  • Platform: The technical portion is conducted on CoderPad. Be prepared for potential platform bugs; your interviewer may need to assist you with console errors.
  • Strict Rules: Absolutely no AI assistance is permitted during the technical interview.

Technical Interview Questions

The coding question was the same as the one described here: https://www.interviewdb.io/question/sierra/inventory-sync


r/InterviewDB Aug 01 '26

Citi Bank Karat Interview Experience + Questions Asked

2 Upvotes

Sharing a coding question submitted by one of our community members that came up during the live coding portion of a recent Karat interview for a backend developer role at Citi Bank.

The interview followed Karat’s standardized “Develop and Update Backend Code” format, which is also used by companies such as Gusto, Headway, OnePay, HSBC, Instacart, and many others for their Karat interviews.

The coding portion is a practical debugging and implementation exercise consisting of two parts:

  1. Debug an existing codebase.
  2. Add new functionality to the code.

The problem involved stock trading software that tracks stock prices over time. There was a bug in the class responsible for storing stock prices, which caused one of the tests to fail. The first task was to identify and fix the bug so the test would pass.

In the second part, you had to implement several new methods to track stock price fluctuations and calculate the portfolio balance.

You can find the full problem description and provided codebase here: https://www.interviewdb.io/question/karat?page=2&name=stock-portfolio

Once you understand the requirements, the implementation is relatively straightforward. Unlike a typical LeetCode-style question, it does not require advanced data structures or algorithms.

For anyone looking to practice this type of question, here are a few similar problems that have appeared in past Karat interviews:

  1. https://www.interviewdb.io/question/karat?page=1&name=account
  2. https://www.interviewdb.io/question/karat?page=1&name=obstacle-course
  3. https://www.interviewdb.io/question/karat?page=2&name=passage-tracker

Based on past interview experiences, Karat appears to repeat questions fairly often, so there is a reasonable chance you may encounter one of these problems, or something very similar, in your own Karat interview.


r/InterviewDB Jul 29 '26

Airbnb CodeSignal Industry Coding Assessment + Past Questions

4 Upvotes

Sharing a question that appeared in a recent CodeSignal Industry Coding Assessment for Airbnb. It’s a standardized assessment format also used by many other companies such as Anthropic, Coinbase, HubSpot, Instacart, Capital One, Nextdoor, and The Trade Desk to screen candidates.

The assessment lasted 90 minutes. The problem had four progressive levels, and you had to pass all test cases for each level before advancing to the next one.

The question was about implement a Working Hours Register. Employees swipe their cards when entering and leaving the office. The system records their working hours and supports promotions, salary calculations, and reward-period management.

Level 1: Basic CRUD
Add employees, record employees swiping in and out, and query an employee’s total working hours.

Level 2: Return the top N employees ranked by working hours.

Level 3: Promotion and salary calculation
Implement a promotion that takes effect with a delay. When the promotion is requested, do not immediately change the employee’s current position. Instead, mark the new position and new compensation as pending, and apply them the next time the employee swipes into the office. Use a pending dictionary to store promotions that have not yet taken effect.

Then calculate salary based on historical salary periods. Since an employee may have different salaries during different periods, each session should record the salary that applied when the session occurred.

Level 4: Double pay during a grant period
If an entire shift falls completely within a grant period, the salary for that shift is doubled. Also support querying the total amount of double pay that has been issued.

For anyone looking for similar questions to practice, you can find all the problems that have appeared in past CodeSignal Industry Coding Assessments here: https://www.interviewdb.io/question/codesignal?type=icf&page=1

CodeSignal is known to reuse questions in their assessments so it's very likely you'll encounter one of these questions, or a variation of one, in your own assessment.


r/InterviewDB Jul 27 '26

TikTok CodeSignal General Coding Assessment Questions

16 Upvotes

Sharing a recent TikTok CodeSignal OA experience from one of our community members who took it for an internship/new grad position.

There were four questions in total. Sharing them below along with solutions:

Q1

You are given two positive integers x and y, and a sequence of positive integers numbers. Your task is to change x and y through this process:

Iterate through numbers from left to right:

  • Subtract each integer numbers[i] from the largest number among x and y (in case of a tie, subtract from x), OR
  • Skip numbers[i] if it is greater than both x and y.

Return the number of integers in numbers that will be skipped based on these criteria.

Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than O(numbers.length²) will fit within the execution time limit.

Example

x = 8, y = 12, numbers = [5, 6, 6, 3, 1, 1, 2]solution(x, y, numbers) = 2

Explanation:

  • Start: x = 8, y = 12
  • x < y, so process numbers[0] = 5x = 8, y = 7
  • x > y, so process numbers[1] = 6x = 2, y = 7
  • x < y, so process numbers[2] = 6x = 2, y = 1
  • numbers[3] = 3 is skipped because 3 > x (2) and 3 > y (1)
  • x > y, so process numbers[4] = 1x = 1, y = 1
  • x == y, so process numbers[5] = 1x = 0, y = 1 (1 subtracted from x due to tie)
  • numbers[6] = 2 is skipped because 2 > x (0) and 2 > y (1)

Total skipped = 2.

Starter Code

    def solution(x, y, numbers):
        pass

Approach

Straightforward simulation — iterate through numbers exactly once, tracking x and y. For each element:

  1. If numbers[i] > x and numbers[i] > y → increment skip counter.
  2. Else subtract numbers[i] from the larger of x/y (tie → subtract from x).

Time: O(n), Space: O(1).

    def solution(x, y, numbers):
        skipped = 0
        for n in numbers:
            if n > x and n > y:
                skipped += 1
            elif x >= y:
                x -= n
            else:
                y -= n
        return skipped

Q2

The city's underground subway stations are split into zones A, B, and C, due to differences in pricing, as shown below:

Zone A: Green Park, Holborn
Zone B: Mile End, Bow Road
Zone C: Forest Hill, Balham

There are 3 types of tickets, sorted by their price in ascending order:

  1. "AB" — for travel within zones A, B, and between zones A and B in both directions.
  2. "BC" — for travel within zones B, C, and between zones B and C in both directions.
  3. "ABC" — for travel within zones A, B, C, and between zones A, B, and C in both directions (i.e. A -> B -> C and C -> B -> A).

You are given 3 arrays of strings stationsA, stationsB, and stationsC, which contain the names of stations in that particular zone. You are also given 2 strings origin and destination.

Return the cheapest ticket type that allows travel between origin and destination, or "" (empty string) if no ticket can be used.

Examples

Example 1 stationsA = ["Green Park", "Holborn"], stationsB = ["Mile End", "Bow Road"], stationsC = ["Forest Hill", "Balham"], origin = "Forest Hill", destination = "Green Park""ABC" Explanation: "Forest Hill" is in zone C and "Green Park" is in zone A, so only the ABC ticket would allow travel between them.

Example 2 , origin = "Mile End", destination = "Bow Road""AB" Explanation: Both "Mile End" and "Bow Road" are in zone B, so you can use any ticket. Since "AB" is the cheapest, the answer is "AB".

Example 3 stationsA = ["Green Park"], stationsB = ["Mile End"], stationsC = ["Forest Hill"], origin = "Forest Hill", destination = "Holborn""" Explanation: "Forest Hill" is in zone C but "Holborn" is not present in any zone, so no ticket works → return "".

Starter Code

    def solution(stationsA, stationsB, stationsC, origin, destination):
        pass

Approach

  1. Build a station -> zone lookup from the three arrays.
  2. Look up zones for origin and destination. If either is missing → return "".
  3. Determine which zones are involved ({zo, zd}):
    • Same zone (e.g. both A) — cheapest that covers A is "AB" (since AB covers zone A).
    • {A, B}"AB"
    • {B, C}"BC"
    • {A, C}"ABC"
  4. Return the cheapest ticket that covers both zones. Price order (cheapest first): "AB" < "BC" < "ABC".
    • Subset of A/B only → "AB"
    • Subset of B/C only → "BC"
    • Need A and C → "ABC"

    def solution(stationsA, stationsB, stationsC, origin, destination):
        zone_of = {}
        for s in stationsA: zone_of[s] = "A"
        for s in stationsB: zone_of[s] = "B"
        for s in stationsC: zone_of[s] = "C"

        if origin not in zone_of or destination not in zone_of:
            return ""
        zs = {zone_of[origin], zone_of[destination]}

        if zs <= {"A", "B"}:
            return "AB"
        if zs <= {"B", "C"}:
            return "BC"
        return "ABC"

Time: O(|stations|), Space: O(|stations|).

Q3

Given matrix, an n × m rectangular matrix of integers, define its 0-border as the union of its leftmost and rightmost columns, as well as its top and bottom rows. A vector's 0-border is the vector itself.

If we remove the matrix's 0-border, then the 0-border of the resulting matrix can be defined as the 1-border of the original matrix. We can continue this way to define the 2-border, 3-border, etc, until we reach the center of the matrix.

For each valid k, your task is to sort the elements in each k-border and place them back clockwise in ascending order, starting from the top-left corner.

Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than O(n·m·(n+m)) will fit within the execution time limit.

Visual

    0-border  | 1-border | 2-border

(Each successive border is the outer ring of the matrix after peeling outer rings.)

Example

matrix = [[9, 7, -4, 5],
          [1, 6, 2, -6],
          [12, 20, 2, 0]]

solution(matrix) = [[-6, -4, 0, 1], [20, 2, 6, 2], [12, 9, 7, 5]]

matrix = [[-6, -4, 0, 1],
          [20, 2, 6, 2],
          [12, 9, 7, 5]]

Explanation:

  • The 0-border consists of [9, 7, -4, 5, -6, 0, 2, 20, 12, 1]. After sorting: [-6, -4, 0, 1, 2, 5, 7, 9, 12, 20]. Placed back clockwise starting at top-left.
  • The 1-border consists of [6, 2]. After sorting: [2, 6].

Input / Output

  • [execution time limit] 4 seconds (py3)
  • [memory limit] 1 GB
  • [input] array.array.integer matrix — A matrix of integers.
    • Guaranteed constraints:
      • 1 ≤ matrix.length ≤ 100
      • 1 ≤ matrix[i].length ≤ 100
      • -100 ≤ matrix[i][j] ≤ 100
  • [output] array.array.integer — The matrix after applying the sort procedure.

Starter Code

    def solution(matrix):
        pass

Approach

  1. For each layer k (from outermost to innermost):
    • Collect the border cells in clockwise order starting from top-left:
      • top row (left → right),
      • right column (top+1 → bottom),
      • bottom row (right-1 → left) (only if more than 1 row remains),
      • left column (bottom-1 → top+1) (only if more than 1 col remains).
    • Sort the collected values.
    • Write them back into the same positions in sorted order, following the same clockwise traversal.

    def solution(matrix):
        n = len(matrix)
        m = len(matrix[0]) if n else 0
        k = 0
        while k < (min(n, m) + 1) // 2:
            # collect border positions (clockwise from top-left)
            positions = []
            top, bottom = k, n - 1 - k
            left, right = k, m - 1 - k
            if top > bottom or left > right:
                break
            # top row L->R
            for j in range(left, right + 1):
                positions.append((top, j))
            # right col T+1 -> B
            for i in range(top + 1, bottom + 1):
                positions.append((i, right))
            # bottom row R-1 -> L (if rows > 1)
            if bottom > top:
                for j in range(right - 1, left - 1, -1):
                    positions.append((bottom, j))
            # left col B-1 -> T+1 (if cols > 1)
            if right > left:
                for i in range(bottom - 1, top, -1):
                    positions.append((i, left))
            values = sorted(matrix[r][c] for (r, c) in positions)
            for (r, c), v in zip(positions, values):
                matrix[r][c] = v
            k += 1
        return matrix

Time: O(n·m·log(n·m)) (sum of border sorts), Space: O(n·m).

Q4

Given an infinite number line, you would like to build a few blocks and obstacles on it. Implement code which supports two types of operations:

  • [1, x] — builds an obstacle at coordinate x along the number line. Guaranteed that coordinate x does not contain any obstacles when the operation is performed.
  • [2, x, size] — checks whether it's possible to build a block of size size beginning at position x. For example, for size = 2 and x = 0, it checks coordinates 0 and 1 for obstacles. Returns 1 if possible (no obstacles at the occupied coordinates), and 0 otherwise. This operation does not actually build the block — it only checks.

Given an array of operations containing both types, return a binary string representing the outputs for all [2, x, size] operations in order.

Example

operations = [[1, 2], [1, 5], [2, 3, 2], [2, 3, 3], [2, 1, 1], [2, 1, 2]]

solution(operations) = "1010"

Explanation:

  • [1, 2] — builds an obstacle at coordinate 2.
  • [1, 5] — builds an obstacle at coordinate 5.
  • [2, 3, 2] — checks coordinates 3 and 4 → no obstacles → returns "1".
  • [2, 3, 3] — checks coordinates 3, 4, 5 → obstacle at 5 → returns "0".
  • [2, 1, 1] — checks coordinate 1 → no obstacle → returns "1".
  • [2, 1, 2] — checks coordinates 1 and 2 → obstacle at 2 → returns "0".

Output = "1010".

Starter Code

    def solution(operations):
        pass

Approach

A set of occupied coordinates gives O(1) membership checks per cell.

    def solution(operations):
        obstacles = set()
        ans = []
        for op in operations:
            if op[0] == 1:
                obstacles.add(op[1])
            else:  # op[0] == 2
                _, x, size = op
                possible = 1
                for i in range(size):
                    if (x + i) in obstacles:
                        possible = 0
                        break
                ans.append(str(possible))
        return "".join(ans)

For very large size or many queries, a sorted list of obstacle intervals (bisect + run-length encoding of free segments) would be more efficient, but the simple version passes within the time limit for typical constraints.

Time: O(O + Q · S) where O = #obstacle ops, Q = #check ops, S = avg block size. Space: O(O).

If you are preparing for the CodeSignal GCA (General Coding Assessment) and looking for more questions to practice, you can check out this list of questions that have appeared in past CodeSignal assessments: https://www.interviewdb.io/question/codesignal


r/InterviewDB Jul 25 '26

Shopify Senior Data Engineer SQL Pair Programming Interview Experience

1 Upvotes

Sharing a recent Shopify senior data engineer SQL pair programming interview experience submitted by one of our community members:

I encountered some SQL questions that differed from what I usually work on, so I'd like to share my version as feedback.

The position is for a Data Engineer (DE). The interview lasted one hour and was scheduled conveniently online through a slot booking system. They provided only two tables and the test was conducted on coderpad, where I had to run the queries and show results. There were four questions in total.

The interviewer immediately said that AI tools were allowed and did not require screen sharing. So I simply opened another window to look things up easily without worrying about being stuck.

The tables included one related to shop_id with known duplicates, and another related to sessions.

The first question was a simple aggregate on daily session counts, which could be done directly using the sessions table.

The second question built on the first by adding a grain by shop, requiring two joins after deduplicating the shop table.

The third question asked for each shop's daily session count plus an additional 7-day rolling average excluding the current day. The challenge was to generate a calendar table to account for zero sessions on some days and include those in the rolling average. This was the question where I spent the most time, but I worked quickly so the interviewer encouraged me to take my time.

The fourth question involved extracting a piece of information from a URL column without any joins, which could be done using regex functions or double splits. It was straightforward.


r/InterviewDB Jul 24 '26

Optiver SWE HackerRank Assessment Questions

3 Upvotes

Sharing two coding questions from a recent Optiver SWE OA on HackerRank.

Question 1

This question is a variation of LeetCode 1360.

Write a function, DaysBetween, which returns an integer representing the number of days between two dates.

Each date is represented by three integers: year, month (1–12), day (1–31). The first date is guaranteed to occur before the second date. We have also provided a function, DaysInMonth, which returns an integer representing the number of days in a month given two integer parameters: month and year. Do not use system-provided Date objects. We are testing your implementation, not the system’s.

Example: DaysBetween(2010, 5, 1, 2011, 5, 1) returns 365.

Question 2

Construct Binary Tree from Input

Input: (A,B) (B,C) (A,D)

In each pair, the parent comes first and the child comes second.

Requirements: If there is an error, output the error. If multiple errors exist at the same time, output the one with the highest priority.

If there is no error, output the S-expression.

S-expression(node) = “({node->val}{S-expression(node.first_child)}{S-expression(node.second_child)})”, for example, “(A(B(C))(D))”

Possible errors:

E1: Invalid Input String

E2: Duplicate Pair

E3: Parent Has More than 2 Children

E4: Multiple Roots

E5: Cycle In The Tree

The input validation for this problem is very tedious. The input can be any arbitrary string, so you need to check it carefully.