Karat

Karat Software Engineer Interview Questions

35+ questions from real Karat Software Engineer interviews, reported by candidates.

35
Questions
2
Round Types
8
Topic Areas
2020-2026
Year Range

Round Types

OA 7 Coding 4

Top Topics

Questions

Anybody have any advice or has recently done the SDE2 interview for mongo db i have the karat interview coming up and would love some help on what kind of leetcode questions to look at

I completed the Karat interview process for Walmart a while back. Did pretty good. I haven’t heard back in a few weeks so I decided to follow up with the recruiter I was in contact with. Their server

Hello everyone, I’m preparing for a Node.js interview with Karat for Proxify and would really appreciate any advice. Has anyone here gone through this process? How did you prepare, and do you remember

Hey guys anyone have experience with Karat interviews? Any list of available questions for the system design part? Seems to be a very unique structure

LeetCode #2133: Check if Every Row and Column Contains All Numbers. Difficulty: Easy. Topics: Array, Hash Table, Matrix. Asked at Karat in the last 6 months.

LeetCode #1160: Find Words That Can Be Formed by Characters. Difficulty: Easy. Topics: Array, Hash Table, String, Counting. Asked at Karat in the last 6 months.

LeetCode #68: Text Justification. Difficulty: Hard. Topics: Array, String, Simulation. Asked at Karat in the last 6 months.

LeetCode #383: Ransom Note. Difficulty: Easy. Topics: Hash Table, String, Counting. Asked at Karat in the last 6 months.

Hello guys, I applied to be a karat interviewer some time ago and they've finally reached out. The issue is I've been on a break and I am really rusty for interviews. Has anyone been through their JS

I just completed a karat technical coding interview for a unicorn company. I prepared only leetcode questions for this interview and felt pretty confident going in. However, the interview was going ov

Hi all, The company I'm interviewing with is using [Karat](https://karat.com/) to conduct the technical assessment. From what I can gather, this is what I'm in for: * Timed (1 hour) * Live video with

## Problem Schedule academic classes or events avoiding time conflicts, likely a greedy interval scheduling or graph coloring problem. ## Tags arrays, sorting, greedy

## Problem Process or find specific endings of book titles or text entries, likely involving string matching or suffix analysis. ## Tags strings, arrays, sorting

## Problem You have `n` camping sites, each with a maximum capacity. You have `m` groups of campers, each with a size and an ordered list of preferred site IDs. Assign each group to a site such that: - The site's remaining capacity accommodates the group size. - Each group gets the highest-ranked available preferred site. Return a dict mapping group ID to assigned site ID. If a group cannot be placed, map it to `null`. ```python def assign_sites(sites: dict[int, int], groups: list[dict]) -> dict[int, int | None]: # sites: {site_id: capacity} # groups: [{"id": int, "size": int, "preferences": [site_id, ...]}] pass ``` **Example:** ``` sites = {1: 4, 2: 2, 3: 6} groups = [ {"id": 10, "size": 3, "preferences": [2, 1, 3]}, {"id": 11, "size": 2, "preferences": [1, 3]} ] Group 10: pref site 2 (cap=2) cannot fit size 3 -> try site 1 (cap=4) -> fits. Assign 10->1. Group 11: pref site 1 (remaining=1) cannot fit size 2 -> try site 3 (cap=6) -> fits. Assign 11->3. Output: {10: 1, 11: 3} ``` ## Follow-ups 1. How would you handle groups that must be placed together on the same site? 2. If groups can be split across sites, how does the problem change? 3. Model this as a stable matching / assignment problem. When is greedy suboptimal? 4. How would you make assignments fair when multiple groups want the same top-ranked site?

## Problem You are given a list of score submissions. Each submission has a `player_id`, `score`, and `timestamp`. A submission is suspicious if the player's score increased by more than `max_delta` points compared to their previous submission. Return a list of suspicious `(player_id, score, timestamp)` tuples, sorted by timestamp ascending. ```python def find_suspicious( submissions: list[dict], max_delta: int ) -> list[tuple]: # submissions: [{"player_id": str, "score": int, "timestamp": int}] pass ``` **Example:** ``` submissions = [ {"player_id": "p1", "score": 100, "timestamp": 1}, {"player_id": "p1", "score": 102, "timestamp": 2}, {"player_id": "p1", "score": 200, "timestamp": 3}, {"player_id": "p2", "score": 50, "timestamp": 4} ] max_delta = 10 p1 goes 100->102 (delta=2, ok) then 102->200 (delta=98, suspicious). Output: [("p1", 200, 3)] ``` ## Follow-ups 1. How would you handle submissions arriving out of order? How does this affect your per-player last-seen-score tracking? 2. What if a player can submit from multiple devices simultaneously? How does your model change? 3. Add a second rule: flag any player whose score exceeds the 99th percentile of all scores in a rolling 1-hour window. 4. How would you design this as a streaming pipeline (Kafka + Flink) at 500K submissions/second?

## Problem Implement encode and decode for two ciphers: **Part 1 - Caesar Cipher:** Shift each letter in `text` by `shift` positions in the alphabet (wrap around). Non-letter characters are unchanged. Decoding shifts in the opposite direction. ```python def caesar_encode(text: str, shift: int) -> str: ... def caesar_decode(text: str, shift: int) -> str: ... ``` **Example:** ``` caesar_encode("Hello, World!", 3) -> "Khoor, Zruog!" caesar_decode("Khoor, Zruog!", 3) -> "Hello, World!" ``` **Part 2 - Vigenere Cipher:** Use a repeating keyword. Each letter is shifted by the corresponding keyword letter's position (a=0, b=1, ...). ```python def vigenere_encode(text: str, key: str) -> str: ... def vigenere_decode(text: str, key: str) -> str: ... ``` **Example:** ``` vigenere_encode("ATTACKATDAWN", "LEMON") A+L=L, T+E=X, T+M=F, A+O=O, C+N=P, K+L=V, ... -> "LXFOPVEFRNHR" ``` ## Follow-ups 1. Why is the Caesar cipher trivially broken? How many keys exist? 2. How would you perform a frequency-analysis attack on a Caesar-encoded message? 3. What is the index of coincidence, and how does it help determine the key length of a Vigenere cipher? 4. How does your implementation handle mixed-case text and Unicode input?

## Problem A delivery robot moves on an `m x n` grid. It starts at `(0, 0)` and must reach `(m-1, n-1)`. Some cells are blocked (obstacles). The robot can move up, down, left, or right one cell per step. Find the shortest path (minimum steps). If no path exists, return -1. If a path exists, also return one valid path as a list of (row, col) tuples. ```python def shortest_delivery( grid: list[list[int]] # 0=open, 1=obstacle ) -> tuple[int, list[tuple[int, int]]]: # returns (steps, path) or (-1, []) pass ``` **Example:** ``` grid = [ [0, 0, 1, 0], [1, 0, 0, 0], [0, 0, 1, 0] ] Output: (5, [(0,0),(0,1),(1,1),(1,2),(2,3)]) -- one valid path ``` ## Follow-ups 1. Why is BFS guaranteed to find the shortest path on an unweighted grid? 2. How would you modify this for a weighted grid where each cell has a traversal cost? (Dijkstra) 3. What if the robot can break through at most `k` obstacles? How does your state space change? 4. If the grid is dynamically updated (obstacles appear/disappear), how would you replan efficiently?

## Problem Parse and analyze domain names from URLs, extracting components such as TLD, subdomain, and root domain. ## Tags strings, arrays, parsing

## Problem Traverse a generational graph (e.g., family tree or dependency graph) to find relationships or generations between nodes. ## Tags graph, BFS, DFS

## Problem Implement the core logic for a two-player turn-based game on a 3x3 grid (like Tic-Tac-Toe generalized to N x N). ```python class MiniGame: def __init__(self, n: int): # n x n board, players are 1 and 2 pass def make_move(self, player: int, row: int, col: int) -> str: # returns "continue", "win", "draw", or "invalid" pass def get_board(self) -> list[list[int]]: pass ``` **Example:** ``` game = MiniGame(3) game.make_move(1, 0, 0) -> "continue" game.make_move(2, 1, 1) -> "continue" game.make_move(1, 0, 1) -> "continue" game.make_move(2, 2, 0) -> "continue" game.make_move(1, 0, 2) -> "win" (player 1 fills row 0) ``` ## Follow-ups 1. How do you check for a win in O(1) per move using running row/column/diagonal counts? 2. How would you implement an AI opponent using minimax with alpha-beta pruning? 3. Extend to a 4-in-a-row (Connect Four) variant on a 6x7 grid with gravity. What changes? 4. How would you serialize and restore game state so players can pause and resume?

See All 35 Karat Software Engineer Questions

Full question text, answer context, and frequency data for subscribers.

Get Access