Backtracking Interview Questions [2026-2027]
144+ real questions from verified interview reports across 12 companies.
Sourced from 1Point3Acres, Blind, Glassdoor, Reddit, and more. Translated and cleaned.
Top Companies Asking Backtracking Questions
Sample Backtracking Questions
Given two strings, str, pattern, find # of discontinous matches of pattern in str. None of the matched letters can be next to each other in str. examples: 1) pattern="cat", str="catapult", result=1,...
Role: Senior Software Engineer HR Screening (15 mins) Initially received a call from HR through a referral. The discussion was around: Current project and responsibilities Tech stack being used How I
Word Search II Given a 2-D grid of characters `board` and a list of strings `words`, return all words that are present in the grid. For a word to be present it must be possible to form the word with
Round 1(Telephonic) Explained about company JD Snake and Ladder game (matrix, array, linked list) Find the row with maximum 1s where every row of sorted 0s and 1s ( ht...
Belzabar Software Design Development recently visited our Campus, as a regular offering Computer Scientist Internships to 2-3 students of the college from CS/IT Engineeri...
John found six dominoes. A domino is a rectangular tile with a line dividing its face into two square halves. Each half is marked with a number of spots. John...
Codenation visited on my campus in August.Round 1 (Written round): First-round was a written round that took place on hackerrank. We need to solve 3 problems in 90 minutes...
#37 Sudoku Solver
LeetCode #37: Sudoku Solver. Difficulty: Hard. Topics: Array, Hash Table, Backtracking, Matrix. Asked at Confluent in the last 6 months.
#39 Combination Sum
LeetCode #39: Combination Sum. Difficulty: Medium. Topics: Array, Backtracking. Asked at NetApp in the last 6 months.
## Problem Given a phone number string, return all possible letter combinations using a T9 keypad mapping via backtracking. ## Likely LeetCode equivalent LeetCode 17 - Letter Combinations of a Phone Number. ## Tags backtracking, strings, recursion
## Problem Determine if a partially filled 9x9 Sudoku board is valid according to row, column, and box constraints. ## Likely LeetCode equivalent LeetCode 36 - Valid Sudoku. ## Tags backtracking, hash_table, matrix
## Problem Generate all permutations of axis values or coordinates using backtracking, covering all possible orderings. ## Likely LeetCode equivalent LeetCode 46 - Permutations. ## Tags backtracking,recursion,arrays,swe
## Problem Solve a word puzzle (e.g., find valid words in a grid or from a scrambled set of letters) using backtracking and a dictionary. ## Likely LeetCode equivalent LeetCode 79 - Word Search. ## Tags backtracking,strings,graph,swe
## Problem Return all possible letter combinations from a phone number digit string. ## Likely LeetCode equivalent LC 17 (Letter Combinations of a Phone Number) is the direct match. ## Tags backtracking, recursion, strings
## Problem Generate all possible combinations of k numbers from 1 to n using backtracking. ## Likely LeetCode equivalent LC 77 - Combinations (>80% confident) ## Tags backtracking, recursion
## Problem Generate all combinations of n pairs of valid parentheses using backtracking. ## Likely LeetCode equivalent LC 22 - Generate Parentheses (>80% confident) ## Tags backtracking, recursion, strings
DoorDash Onsite
Coding Round 1: Two Variations of https://leetcode.com/problems/count-all-valid-pickup-and-delivery-options/ 1. Given array of pick up and delivery options, make sure that the array is valid. Example 1: Input: [\'P1\', \'D1\'] Output: True Explanation: P1 comes...
DoorDash Onsite
Phone Screen: https://leetcode.com/problems/employee-free-time/ Onsite: First coding round: https://leetcode.com/problems/valid-sudoku, and https://leetcode.com/problems/sudoku-solver/ Second coding round: https://leetcode.com/problems/analyze-user-website-visit-pattern/ Follow up: If you cannot store that data on a single machine, and you have very large data - how...
Athena Health Interview Experience | Set 2
Round 1:10 Aptitude questions with difficulty level hard. Round 2:3 programs given. 1st one mandatory.1) Replace wild cards with all possible combinations of zeros and one...
LeetCode #22: Generate Parentheses. Difficulty: Medium. Topics: String, Dynamic Programming, Backtracking. Asked at Walmart Labs in the last 6 months.
#212 Word Search II
LeetCode #212: Word Search II. Difficulty: Hard. Topics: Array, String, Backtracking, Trie, Matrix. Asked at Zoom in the last 6 months.
## Problem Fillomino is a logic puzzle where you fill an N x M grid so that every cell belongs to a connected region of cells, and each region's size equals the number written in any of its cells. Given a partially filled grid, write a solver that completes it. ```python def solve_fillomino(grid: list[list[int]]) -> list[list[int]]: # 0 = empty cell; non-zero = given clue # Returns completed grid, or raises if no solution exists pass def is_valid(grid: list[list[int]]) -> bool: # Validates a completed grid against Fillomino rules pass ``` **Example (4x4):** ``` Input: Output: [3, 0, 0, 2] [3, 3, 3, 2] [0, 0, 0, 2] [4, 4, 4, 2] [0, 0, 4, 0] [1, 4, 4, 4] [0, 0, 0, 0] [5, 5, 5, 5] ``` ## Follow-ups 1. What pruning strategies reduce backtracking? (Describe constraint propagation.) 2. How do you detect that two regions of the same number would need to merge, which is illegal? 3. What is the worst-case complexity of your backtracking solution? 4. How would you generate a valid Fillomino puzzle with a unique solution?
280/600. 210/300 for a backtracking problem. and 70/300 for an array problem. I just learned backtracking so I had an error but I don't know what it was. Had to move on cause I already took a lot of m
Word Search ## The Challenge You are provided with a 2-D grid of characters called `board` and a specific string called `word`. Your task is to determine if the `word` exists inside the grid. If it
See All 144 Backtracking Questions
Full question text, interview context, and company-specific frequency data for subscribers.
Get Access