Karat interview questions

Tech / SWE · 10 questions
Report an interview →

Browse 10 Karat interview questions for software engineering and software development interview preparation. Questions in this collection are tagged for full-time roles. Explore the topics and stages below and filter the collection to plan your practice.

Interview stages in this collection
Phone screen, Onsite, Online assessment (OA)
Practice topics
Array (8), Hash Table (5), Matrix (5), String (5), Depth-First Search (3), Breadth-First Search (2), Counting (2), Backtracking (1)

Questions come from candidate contributions and online research. Reports reflect past experiences and do not guarantee what Karat will ask. Locked question details require points. Public examples below are free to read.

Read 3 free Karat interview question examples

Browse all Karat questions

10 questions

Free Karat interview question examples

Read the full problem statements and use the links to revisit or share a specific example.

Text Justification

Hard · Phone screen · Onsite · Full-time

Text justification. Pack words into lines of exactly maxWidth characters, distributing extra spaces evenly with a left bias. The last line is left-justified. I processed words greedily, filling each line as much as possible, then calculated spacing. Getting the space distribution right with integer division and remainders was the tedious part. The interviewer appreciated that I handled the last-line edge case cleanly.

Valid Matrix Numbers

Easy · Online assessment (OA) · Full-time

Check if every row and column in an n x n matrix contains all integers from 1 to n. Quick validation problem, done in a few minutes. The interviewer moved on to harder stuff pretty quickly after this one.

Words From Characters

Easy · Online assessment (OA) · Full-time

Given words and a pool of characters, sum the lengths of all words that can be formed using only the available characters. Straightforward frequency counting. The interviewer asked about what changes if characters can be reused across words, which is a different problem entirely.