Interview questions
Find a company or topic. Read the sources, then practice.
Loading the question library…
Find a company or topic. Read the sources, then practice.
Loading the question library…
Showing 51–55
Given an undirected graph and a set of initially infected nodes, choose one initial node to remove so that the eventual malware spread across connected…
Companies: Zomato
Array · Breadth-First Search · Depth-First Search · Graph Theory
Count how many downward paths (parent→child, can start and end at any nodes) in a binary tree sum to a given target. The challenge is…
Companies: TikTok
Binary Tree · Depth-First Search · Tree
Reconstruct a binary tree from a preorder string where each node is represented by its value prefixed with D dashes indicating its depth (root depth…
Companies: Grammarly
Binary Tree · Depth-First Search · String · Tree
Given a special binary tree where each internal node's value equals the minimum of its two children and every node has either 0 or 2…
Companies: LinkedIn
Binary Tree · Depth-First Search · Tree
Given a binary tree with unique node values, produce the shortest path from start node s to destination t as a string of 'L', 'R'…
Companies: Snowflake
Binary Lifting · Binary Tree · Depth-First Search · Lowest Common Ancestor