recursion Interview Questions
98 interview questions in our bank cover recursion, most of them Coding & Leetcode-style Questions. They average 2.9/5 difficulty — medium — and each one was reported by a candidate after a real interview. Companies known to ask about recursion: Snowflake, Google, Amazon, Uber, Meta, and 15 more.
Practice these on the problems board →Companies that ask about recursion
Question mix
- Coding & Leetcode-style Questions97
- Behavioral1
Difficulty
- 1/5 — warm-up1
- 2/5 — easy18
- 3/5 — medium64
- 4/5 — hard15
Questions tagged recursion
OpenSheet: Spreadsheet with Cell Dependencies
3/5In this coding interview question reported at OpenAI, you are asked to build a mini spreadsheet application that manages cell references, mathematical formulas, and automatic dependency updates. The challenge requires handling arithmetic operations while detecting and preventing circular references among cell links, with follow-ups exploring optimized evaluation graphs. It tests your graph traversal algorithms, state management, and object-oriented design capabilities. Access to the complete problem breakdown and verified model solution requires a subscription.
Coding & Leetcode-style QuestionsOpenAIFile System Encryption Count and Minimum-Cost Encryption
3/5This Databricks interview question invites you to navigate a hierarchical file system tree to compute security statistics and optimize encryption overhead. The first part tests your recursive tree traversal capabilities, while the second part explores optimization strategies for minimizing operational costs across nested directories and individual files. It is an excellent exercise for practicing dynamic programming and greedy choices on tree structures. To view the comprehensive problem description and optimal model solution, a subscription is required.
Coding & Leetcode-style QuestionsDatabricksFlatten / Unflatten Nested Python Structure
3/5Navigating arbitrarily nested hierarchies is a common hurdle in data processing interviews, as reported from recent xAI hiring loops. This exercise challenges candidates to recursively traverse mixed collections of dictionaries, lists, and tuples to linearize elements into a sequential format, and subsequently reconstruct the original shape using updated leaf values. It evaluates recursion depth management, structural awareness, and data parsing skills. Access the complete problem description, step-by-step guidance, and fully tested solution code with a subscription.
Coding & Leetcode-style QuestionsxAIFlatten a Multilevel Doubly Linked List
3/5Tackling complex pointer manipulation is the core of this popular Bloomberg interview question focused on hierarchical data structures. You are tasked with transforming a multi-layered linked list into a flattened, single-tier sequence while maintaining a precise depth-first traversal order and correctly updating all bidirectional connections. This exercise evaluates your dexterity with pointer logic, edge-case management, and structural invariants in custom collections. Gain access to the full problem statement and optimal verified solution by subscribing now.
Coding & Leetcode-style QuestionsBloombergPath Between Nodes in a Fibonacci Tree
4/5Reported as a challenging Databricks interview question, this task involves navigating massive recursively defined binary trees without actually instantiating the nodes in memory. You must rely on mathematical properties and preorder traversal formulas to locate the lowest common ancestor and trace the exact route between two given nodes. This problem tests advanced recursive comprehension, mathematical deduction, and tree traversal optimization. Unlock the complete problem statement, algorithmic breakdown, and production-ready solution by subscribing.
Coding & Leetcode-style QuestionsDatabricksBinary Decoder / Simplified BSON Parser
4/5Parsing serialized byte streams is a classic systems-level challenge often featured in technical assessments, such as this reported MongoDB interview question. You will build a custom decoder that translates hexadecimal encoded binary formats into structured hierarchical objects, requiring careful handling of byte-level offsets and endianness. This puzzle tests your deep understanding of data serialization and memory layout manipulation. Gain access to the full problem statement, test cases, and a comprehensive code solution with a paid subscription.
Coding & Leetcode-style QuestionsMongoDBNested Todo List
3/5Reported during Notion interview loops, this problem asks candidates to build a hierarchical task manager capable of handling nested structures and completion states. The exercise evaluates tree manipulation, efficient node lookup, and state mutation within a forest data model. Developers must carefully manage parent-child relationships and sequential updates. To unlock the complete problem specifications and model solution, a subscription is required.
Coding & Leetcode-style QuestionsNotionDice Roll Simulator and Multiplication-Free Factorial Calculation
2/5This reported Nomura interview challenge tests your foundational programming logic by asking you to build a stochastic simulator for random dice outcomes accompanied by verification test cases. Additionally, it requires implementing a mathematical factorial computation using unconventional constraints that forbid standard multiplication operators. You will need to demonstrate creative problem-solving and algorithmic thinking to handle these distinct computational tasks efficiently. Access to the complete problem description, edge-case evaluations, and fully functional model solutions requires an active subscription.
Coding & Leetcode-style QuestionsNomuraMerge Two Sorted Linked Lists
1/5Practice a fundamental linked list manipulation task commonly asked in Snowflake technical screens, where you are given two pre-sorted sequences and tasked with combining them into a single ordered list. Rather than allocating entirely new structures, you must skillfully rearrange existing node pointers to weave the elements together seamlessly. This foundational exercise hones your pointer manipulation skills and reinforces clean memory management principles. Access the complete problem description, edge-case analysis, and optimal code implementation with a subscription.
Coding & Leetcode-style QuestionsSnowflakeSame N-ary Tree Comparison
2/5This Oracle interview question expands upon traditional binary tree comparison tasks by asking you to evaluate N-ary trees for structural and value equality. You will first tackle the straightforward recursive approach, followed by an advanced iterative follow-up that traverses both hierarchies simultaneously using explicit auxiliary data structures. It serves as an excellent test of your tree traversal mastery and pointer management. The comprehensive breakdown, alongside recursive and iterative model solutions, requires a paid subscription.
Coding & Leetcode-style QuestionsOracleString Decompression with Nested Counts
3/5Tackle a popular Google onsite coding challenge centered on decoding complex, nested string compression formats. You will need to process characters and repeatable blocks efficiently, handling arbitrary levels of nesting and numeric multipliers to reconstruct the original text. This problem tests your stack manipulation skills, parsing logic, and recursive thinking. The comprehensive problem description and the complete, optimized model solution are available exclusively to subscribers.
Coding & Leetcode-style QuestionsGoogleDelete a File System Subtree with Limited APIs
3/5This file system manipulation puzzle, featured in Datadog interviews, tasks developers with deleting an entire directory subtree using a severely restricted set of immutable application programming interfaces. Because deletion rules prevent removing non-empty directories directly, candidates must devise a reliable traversal strategy to clean up nested paths safely. This problem evaluates recursive problem-solving skills and meticulous edge-case handling within hierarchical structures. Gain immediate access to the full problem breakdown and expert solution with a subscription.
Coding & Leetcode-style QuestionsDatadogImplement a Calculator with Brackets
4/5In this classic expression evaluation challenge reported from WeRide, you must construct a robust arithmetic calculator that correctly handles basic operations along with parentheses and operator precedence rules. The task evaluates your ability to parse structured text strings efficiently while respecting mathematical hierarchy and integer division behaviors. Tackling this problem hones your stack-based parsing skills and algorithmic logic for complex string manipulation. Unlock the full problem details and reference solution by obtaining a subscription.
Coding & Leetcode-style QuestionsWeRideMenu Tree Diff — Count Changed Nodes
3/5Featured in DoorDash engineering interviews, this tree-comparison challenge requires you to compute structural and value discrepancies between an existing menu hierarchy and a newly submitted version. You must carefully account for node identities determined by both keys and hierarchical positions while detecting modifications, additions, and complete subtree deletions. This problem evaluates your recursive traversal skills and tree-diff algorithmic design under practical business constraints. Unlock the complete problem description and model solution by subscribing today.
Coding & Leetcode-style QuestionsDoorDashLowest Common Ancestor (BST / Binary Tree / N-ary)
3/5Popular in Meta technical interviews, this problem explores finding the lowest common ancestor across various hierarchical tree structures including binary search trees, standard binary trees, and N-ary variants. It tests recursive traversal strategies, edge cases involving missing nodes, and optimization techniques utilizing parent pointers. Access the complete set of variations and optimal solutions with a subscription.
Coding & Leetcode-style QuestionsMetaRecursive JSON-like Schema Validation
3/5This algorithmic problem, featured in Amazon technical interviews, requires building a robust recursive validation engine that checks whether arbitrary nested data structures conform to predefined hierarchical rules. Candidates must demonstrate proficiency in tree traversal, type checking, and handling complex composite objects and collections. This exercise tests your ability to write clean, defensive parsing logic for deeply nested payloads. Access the complete problem description and optimal model solution by acquiring a subscription.
Coding & Leetcode-style QuestionsAmazonGoldman Sachs HireVue Behavioral and Recursion
2/5This Goldman Sachs HireVue assessment features a combination of behavioral inquiries and professional ethics evaluations commonly reported by candidates. You will be prompted to reflect on past experiences involving workplace disagreements, uncooperative teammates, ambitious hurdles, and compliance dilemmas where client demands clash with internal company rules. The exercise measures your communication clarity, accountability, and integrity when resolving high-pressure corporate scenarios. Unlocking the full set of prompts, evaluation criteria, and expert response frameworks requires a paid subscription.
BehavioralGoldman SachsString Transformation Length
3/5This MathWorks coding challenge explores string manipulation and sequence scaling over multiple generation rounds. You are tasked with determining the final length of a text after applying a deterministic alphabet shift repeatedly, where specific characters expand into multiple new letters. The puzzle evaluates your skill in recognizing exponential growth patterns and utilizing recurrence or dynamic programming to avoid time-out errors. Unlocking the complete problem description and optimal source code requires an active subscription.
Coding & Leetcode-style QuestionsMathWorksPow(x, n) — Fast Power with Negative Exponents
3/5This algorithmic challenge, frequently asked by WeRide, focuses on computing numerical exponents efficiently using logarithmic time complexity techniques. You must account for edge cases such as fractional bases, large values, and negative powers while maintaining precision. The full problem statement, constraints, and optimized model code require an active subscription.
Coding & Leetcode-style QuestionsWeRideRegex Matching With Grouped Stars
4/5This Amazon interview puzzle requires you to build a custom pattern matching engine that extends traditional wildcard rules to support repeated multi-character blocks. You must parse specialized expressions containing grouped sequences and repetition tokens to validate text integrity efficiently. The evaluation focuses on your ability to handle complex state transitions, string parsing, and recursive or dynamic programming approaches. Unlocking the full problem guidelines, edge cases, and the comprehensive model solution requires a subscription.
Coding & Leetcode-style QuestionsAmazonCombination Sum
3/5Featured as an IMC Trading interview problem, this exercise challenges you to discover all possible subsets of numbers that accumulate to a precise sum value with unlimited element reuse. You must systematically explore various numerical combinations while avoiding redundant outputs and managing constraints efficiently. This problem tests your expertise in recursion, backtracking strategies, and combinatorial search spaces. Access to the complete problem specifications, complexity analysis, and the official model solution requires a subscription.
Coding & Leetcode-style QuestionsIMC TradingRewrite Second Tree With Subtree Sums
3/5This Snowflake interview prompt requires you to transform a binary tree by replacing each node value with the aggregated sum of its corresponding subtree from a structurally identical reference tree. The exercise evaluates your grasp of recursive traversal techniques, tree synchronization, and parallel processing considerations for handling heavy computational workloads with limited resources. Designing an efficient propagation strategy is key to passing the evaluation. The full problem and model solution require a subscription.
Coding & Leetcode-style QuestionsSnowflakeValidate Binary Search Tree
3/5Explore how to analyze hierarchical tree structures to verify adherence to strict ordering rules, a classic graph traversal challenge frequently featured in technical evaluations at Pinduoduo. This exercise assesses your ability to recursively or iteratively enforce boundaries across descendant nodes while handling edge cases cleanly. Sharpen your algorithmic thinking for validating relational hierarchies efficiently. Access to the comprehensive problem description, optimal strategies, and complete code solutions requires a platform subscription.
Coding & Leetcode-style QuestionsPinduoduoN-ary Tree Sum + Leaf next Pointer
3/5In this multi-stage technical assessment from Citadel, candidates must work with custom tree structures, aggregate node values, and restructure references during traversal. The exercise progressively increases in difficulty, culminating in an optimized routine that rearranges pointers in constant auxiliary memory without relying on external collections. Tackling this problem demands strong pointer intuition and careful state management. Unlock the full problem description and expert code implementation with a paid subscription.
Coding & Leetcode-style QuestionsCitadelTree Diameter / Longest Path
3/5Featured as a common technical assessment topic at Meta, this graph theory challenge asks you to determine the maximum distance between any pair of vertices within a hierarchical tree structure. Whether applied to binary trees or generalized multi-child nodes, the exercise tests your mastery of recursive traversal techniques, depth-first search strategies, and how to compute path metrics efficiently across branching pathways. To explore the full problem statement along with a detailed code solution, an active subscription is required.
Coding & Leetcode-style QuestionsMetaCheck Whether a Mahjong Hand Is Winning
3/5Encountered in Google coding interviews, this puzzle requires you to determine whether a given collection of numeric tiles forms a valid winning hand according to specific matching rules. You must decompose the set into a matched pair and multiple valid triplets or consecutive runs through systematic searching. The problem tests recursive backtracking, constraint validation, and combinatorial partitioning strategies. Subscribe today to unlock the complete problem description and optimal algorithmic solution.
Coding & Leetcode-style QuestionsGoogleDecode String
3/5Featured in Apple coding assessments, this puzzle challenges you to reconstruct a fully expanded text from a compressed format using nested repetition rules. The problem tests your proficiency with stack data structures, string manipulation, and parsing nested patterns efficiently under constraints. You will need to carefully track multipliers and grouping boundaries to expand the sequence properly. The full problem and model solution require a subscription.
Coding & Leetcode-style QuestionsAppleEvaluate a Nested Math Expression
3/5Parse and compute nested functional expressions smoothly with this classic parsing challenge frequently asked at Google. The task assesses your proficiency with recursion, stack-based parsing, and transforming structured string inputs into evaluated numeric results. You will practice breaking down nested grammar rules and managing operator precedence without relying on unsafe evaluation functions. Unlock the comprehensive problem guide, parsing strategies, and clean model solution by obtaining a subscription.
Coding & Leetcode-style QuestionsGoogleDecode String with (group){k} Repeat Syntax
3/5Tackle this engaging string manipulation puzzle reminiscent of a Waymo interview variant, where compressed text must be fully expanded using custom repetition syntax and parentheses. This challenge tests your mastery of stack-based parsing algorithms, nested data structures, and efficient character decoding techniques to handle arbitrarily deep hierarchies. Candidates must carefully track opening and closing delimiters alongside numeric multipliers to reconstruct the original sequence accurately. The complete problem statement, test cases, and optimal model solution are available exclusively to subscribers.
Coding & Leetcode-style QuestionsWaymoLetter Combinations of a Phone Number
3/5Practice this classic Uber interview question that requires generating all possible letter sequences corresponding to a sequence of numeric keypad digits. You will translate phone button mappings into combinations through systematic exploration and tree generation. The problem tests your recursive backtracking skills and invites comparative analysis with iterative generation strategies. Unlock the comprehensive challenge guidelines and a verified code solution by subscribing.
Coding & Leetcode-style QuestionsUberImplement deleteDirectory in a Virtual File System
3/5This Google interview question places you inside a simulated directory architecture where you must manage hierarchical nodes and recursive cleanups. You are tasked with implementing directory removal logic that safely dismantles nested folders and eliminates all enclosed files without leaving orphan references. The problem evaluates your familiarity with tree-like structures, recursive traversal patterns, and memory management concepts in virtualized environments. Discover the complete problem statement and professional solution code with a subscription.
Coding & Leetcode-style QuestionsGooglePermutations
2/5Master the art of generating all unique arrangements from a collection of distinct numbers in this classic algorithmic challenge frequently asked in Apple technical screenings. This exercise evaluates your understanding of backtracking techniques, recursion depth management, and state space exploration. You will learn how to systematically build combinations while avoiding redundancy. To explore the complete problem statement, optimal algorithmic approaches, and a thoroughly tested model solution, a paid subscription is required.
Coding & Leetcode-style QuestionsAppleFilter Nested Comments — Keep Matched Nodes and Descendants
3/5Tackle this Bobyard technical screening question centered around hierarchical tree filtering and traversal. Given a nested discussion forest and a specific match condition, you need to prune the structure so that any matching node—along with its entire subtree of descendants—is preserved while unrelated branches are discarded. This challenge tests your recursive programming abilities, tree manipulation techniques, and optimization strategies for linear time complexity. Unlock the complete problem details and model solution with a subscription.
Coding & Leetcode-style QuestionsBobyardPrint Comments Hierarchically by Parent-Child Relationship
2/5In this engaging coding exercise reported during Nextdoor interviews, engineers are tasked with organizing a flat collection of user remarks into a structured, tree-like hierarchy based on parent-child identifier relationships. The primary objective is to render these discussion threads correctly indented and sequentially ordered in the output. This challenge evaluates your proficiency in graph traversal, recursive thinking, and efficient data structuring using mapping techniques. To view the complete problem statement, detailed constraints, and a robust reference implementation, a paid subscription is required.
Coding & Leetcode-style QuestionsNextdoorCount Invalid Nodes in a Binary Search Tree
3/5In this coding exercise reported from an AppLovin interview, you must traverse a binary tree to identify and count nodes that violate standard ordering invariants. The task evaluates your proficiency with tree traversal algorithms, recursive thinking, and boundary condition management when handling hierarchical data structures. You will need to carefully validate parent-child relationships across subtrees without relying on pre-sorted assumptions. Unlock the full problem statement, test cases, and expert solution with a subscription.
Coding & Leetcode-style QuestionsAppLovinLowest Common Ancestor of a Binary Tree
3/5This widely encountered technical interview question, frequently reported during hiring evaluations at Uber, challenges candidates to locate the deepest shared node of two specific targets within a hierarchical tree structure. The exercise evaluates your grasp of recursive traversal and structural navigation without relying on heavy auxiliary memory. You will need to efficiently traverse branches while tracking lineage relationships to isolate the correct intersecting point. Access to the complete problem description, comprehensive test cases, and an optimal model solution requires a subscription.
Coding & Leetcode-style QuestionsUberDecode Morse With Word Separator — All Decodings
3/5This intricate parsing problem, documented in software engineering interviews at Amazon, involves translating a continuous sequence of dot and dash signals into valid textual sentences using a provided dictionary and designated word delimiters. Because individual segments lack internal character boundaries, multiple interpretations are often possible, requiring you to generate and sort every uniquely decodable message. The task evaluates advanced string manipulation, recursion, and backtracking strategies to handle combinatorial explosion. Unlock the full problem context and an optimal model solution with a subscription.
Coding & Leetcode-style QuestionsAmazonIn-Memory File System
3/5This popular Harvey technical interview challenge asks you to build a simulated data hierarchy that supports directory navigation, file creation, and content retrieval using hierarchical naming paths. The exercise tests your proficiency with tree structures, custom parsing logic, and efficient in-memory data organization. Additional complexities involve handling duplicate naming conflicts and capacity limits within folders. Unlock the complete technical breakdown and expert solution by purchasing a subscription.
Coding & Leetcode-style QuestionsHarveyTree Node Deletion → Max Height
3/5Hierarchical data manipulation is a key theme in advanced algorithmic interviews, as demonstrated by this Snowflake tree modification challenge. Given an N-ary tree and a set of nodes targeted for removal, you must compute the maximum resulting height after bypassing deleted nodes and rerouting their descendants. This problem evaluates your depth-first search techniques, tree pointer restructuring, and recursive height calculations. To review the entire problem specification along with the step-by-step solution, a subscription is needed.
Coding & Leetcode-style QuestionsSnowflakeValidate Brackets & Parse Nested Rich Text
3/5Master a two-part text manipulation challenge commonly featured in engineering evaluations at Figma. The first phase evaluates your ability to verify structural correctness in character sequences containing paired delimiters, while the second phase requires transforming hierarchical syntax into nested collection formats. This problem tests fundamental concepts in recursion and linear data structures. To view the full problem statement, detailed explanations, and complete model solution, a paid subscription is required.
Coding & Leetcode-style QuestionsFigmaRetrieve Concrete Items From a Nested Box
3/5Navigating hierarchical data structures is a fundamental computer science competency, frequently tested in coding evaluations at companies like Amazon. This task requires you to traverse nested container definitions, resolve references, and extract all primitive elements contained within a specified target. You will need to design an approach that handles recursive nesting and delivers a cleanly ordered output. Practicing this scenario strengthens your recursive traversal and tree-handling abilities. Unlocking the full problem specification and reference implementation requires an active subscription.
Coding & Leetcode-style QuestionsAmazonLongest Univalue Path
3/5Tackle a classic tree traversal problem often featured in Snowflake technical screenings, where you must find the longest continuous sequence of identical values within a binary tree. This challenge assesses your ability to design recursive algorithms that compute metrics across arbitrary branches rather than strictly from root to leaf. You will need to carefully track state and handle overlapping subpaths efficiently. The complete problem description and expert model solution require a subscription.
Coding & Leetcode-style QuestionsSnowflakeString-Command Stream Calculator
3/5Parsing and evaluating sequential instruction streams is a classic systems-level coding challenge frequently featured in technical interviews at cloud data warehousing pioneers like Snowflake. This problem requires building an interpreter that processes textual arithmetic operations while maintaining a dynamic running state and handling potential command structures. Candidates must demonstrate strong string manipulation skills, robust state management, and the ability to gracefully handle edge cases or nested instructions. Unlock the complete problem statement, comprehensive test suites, and expert-authored model solutions with a subscription.
Coding & Leetcode-style QuestionsSnowflakeGenerate Parentheses
3/5Practice this popular interview question reported at Disney, where you must systematically construct all well-formed sequences of paired symbols for a given count. The objective is to generate combinations that adhere strictly to nesting rules and maintain proper balance from start to finish. This problem is excellent for building recursion and backtracking skills. The complete problem guide and reference solution require a active subscription.
Coding & Leetcode-style QuestionsDisneyNested Add/Sub Expression Evaluator
3/5This Uber interview question tests your ability to design a custom parser and evaluator for hierarchically structured arithmetic expressions containing nested operations. You must build a robust algorithm that handles operator precedence, whitespace variations, and function-style syntax without relying on built-in evaluation tools. The problem challenges your recursive parsing skills and understanding of grammar structures used in compilers. Read the full problem specification, edge case analysis, and complete reference solution with an active subscription.
Coding & Leetcode-style QuestionsUberPre-order Traversal Skipping Invalid Nodes
2/5This Snowflake interview question asks you to implement a modified pre-order tree traversal that handles disconnected or skipped nodes. You will need to process hierarchical data where specific elements are marked as inactive, ensuring that their descendants are still visited in the correct sequence through their nearest active ancestors. This exercise tests your recursive depth-first search logic and ability to manipulate parent-child relationships efficiently. Unlock the full problem description and complete model solution with a subscription.
Coding & Leetcode-style QuestionsSnowflakeWildcard / Regex String Matching (star operator)
3/5As a classic algorithmic puzzle frequently featured at Citadel, this question tests your ability to perform pattern matching with wildcard and repetition operators over text sequences. You must design a robust validation routine that handles arbitrary character substitutions alongside sequence repetition rules across an entire string. Interviewers typically look for an initial memorized recursive approach before steering you toward an optimized bottom-up dynamic programming strategy. The full problem and model solution require a subscription.
Coding & Leetcode-style QuestionsCitadelCount Divisible Permutations
3/5Asked during Deloitte software engineering assessments, this combinatorial counting puzzle requires you to evaluate permutations of integer sequences based on specific divisibility relationships between index positions and their assigned elements. It challenges your recursive backtracking skills and combinatorial counting logic to efficiently filter valid arrangements without exceeding computational limits. This scenario heavily exercises advanced mathematical reasoning and pruning techniques. The full problem and model solution require a subscription.
Coding & Leetcode-style QuestionsDeloitteWord Search in a 2-D Grid
3/5This Snowflake interview question evaluates your ability to navigate a character matrix along contiguous horizontal and vertical paths to locate a specific sequence. Candidates must demonstrate proficiency in backtracking and graph traversal techniques to efficiently check possible routes without reusing identical grid positions. Access to the comprehensive problem description and optimal algorithmic implementation requires a subscription.
Coding & Leetcode-style QuestionsSnowflakeGet Nested Object Value by Path String
3/5This Amazon interview question challenges you to safely traverse deeply nested data structures using a flexible query string that combines dotted object keys and array indices. It tests your recursion skills, token parsing, and robust error handling when encountering missing properties or out-of-bound references. You must design a resilient accessor function that gracefully handles various edge cases in complex JSON-like objects. Access to the full problem details and expert model solution requires a paid subscription.
Coding & Leetcode-style QuestionsAmazonDojo Pythonic Coding Pair: Permutation Check and Pow
3/5Prepare for a Tesla technical assessment with this dual-task coding challenge focused on validating a sequential number arrangement and implementing an efficient exponentiation function. This interview scenario evaluates your command of idiomatic Python constructs, algorithmic efficiency, and your ability to optimize memory utilization under tight operational constraints. Candidates must navigate tricky edge cases while adhering strictly to strict space complexity limitations imposed by the interviewer. Access to the complete problem breakdown, optimal algorithms, and fully commented model solutions requires an active subscription.
Coding & Leetcode-style QuestionsTeslaPow(x, n) — Fast Exponentiation
2/5Frequently asked in Meta technical interviews, this task asks developers to compute numerical exponentiation efficiently for both positive and negative powers, aiming for logarithmic time complexity. Additionally, candidates may be asked to handle modular arithmetic extensions to prevent integer overflow during large calculations. This exercise tests your grasp of divide-and-conquer paradigms, bit manipulation, and mathematical optimizations in coding. To access the full problem walkthrough and the reference implementation, you will need a subscription.
Coding & Leetcode-style QuestionsMetaFlatten Nested JSON / HashMap to String
3/5This technical coding challenge commonly seen at Salesforce examines your ability to manipulate hierarchical structures using recursion or iterative traversal. You are asked to transform a deeply nested associative structure into a single-level layout utilizing dot-separated keys for leaf elements. This tests your proficiency in handling diverse data types, managing recursive base cases, and restructuring complex information cleanly. Unlock the full problem details and optimal algorithmic solution with our comprehensive subscription.
Coding & Leetcode-style QuestionsSalesforceConstruct Quad Tree
3/5Explore a classic hierarchical matrix compression problem often featured in technical rounds at Uber. This question challenges your ability to recursively partition spatial data and construct a specialized tree structure based on uniform region values. Testing your grasp of divide-and-conquer algorithms and tree manipulation, the exercise requires careful handling of quadrant boundaries and node states. Discover the complete algorithmic approach, optimal implementation techniques, and full solution code by subscribing today.
Coding & Leetcode-style QuestionsUberSerialize Arithmetic Expression Tree with Minimum Parentheses
4/5This challenging coding assessment, reported from Waymo, tests your ability to flatten hierarchical expression structures into readable infix notation while strictly adhering to operator precedence rules. Given a syntax tree of variables and arithmetic operators, the objective is to generate a text representation using the absolute fewest parentheses necessary to maintain correct evaluation semantics. It evaluates your mastery of tree traversals, recursion, and algebraic parsing logic. The full problem statement, detailed constraints, and reference implementation require a subscription.
Coding & Leetcode-style QuestionsWaymoRoot-to-Leaf Path Sum and All Matching Paths
3/5In this coding problem reported from Hudson River Trading, you are asked to analyze hierarchical tree structures to find specific numerical trajectories. The primary task is to identify whether a continuous path from the root node to a terminal leaf accumulates to a given target sum, with a follow-up requirement to extract all such matching routes. This exercise evaluates your proficiency with depth-first search, backtracking, and tree traversal patterns. To access the complete problem requirements, constraints, and verified solution, a subscription is required.
Coding & Leetcode-style QuestionsHudson River TradingRecursive JSON Schema Validator
3/5This Amazon onsite coding challenge tests your object-oriented design and recursive parsing skills by asking you to build a custom validator for hierarchical data structures against a defined specification. You must handle various data types, optional properties, nested lists, and missing fields while producing informative error paths when validation fails. It is an excellent test of robust edge-case management and clean code architecture. Access to the complete problem specifications and the verified implementation requires a subscription.
Coding & Leetcode-style QuestionsAmazonTennis Rounds: Print Round Winners
2/5Simulate a competitive single-elimination sports bracket in this engaging coding challenge frequently asked during Uber technical interviews. The task evaluates your ability to manage arrays, perform round-by-round simulations, and handle hierarchical data pairing based on participant rankings. Additionally, it tests your capacity to construct structured seeding arrangements for balanced tournament trees. Gain full access to the complete problem analysis, edge cases, and clean model solution by obtaining a subscription.
Coding & Leetcode-style QuestionsUberImplement Nested Comments Feature for a Comment System
2/5In this Bobyard reported interview question, you must transform a flat collection of comment records into a hierarchical structure where individual responses correctly nest beneath their corresponding parent items. The task requires building a recursive or pointer-based grouping function that efficiently handles multiple levels of depth using unique identifiers. It tests your data organization abilities and proficiency with hierarchical JSON payloads. Access to the complete problem breakdown and expert model solution requires an active subscription.
Coding & Leetcode-style QuestionsBobyardCompare Two Structs / Classes for Equality
2/5This Uber reported interview question requires you to design a robust mechanism that compares two complex data structures or class instances to determine if they are identical. Rather than just writing code, the evaluation heavily focuses on clarifying edge cases such as value versus reference semantics, nested objects, floating-point tolerances, and potential reference cycles. It assesses your architectural thinking, requirement gathering, and deep understanding of object models. Access to the complete problem breakdown and expert model solution requires an active subscription.
Coding & Leetcode-style QuestionsUberBinary Tree Maximum Path Sum (with path reconstruction)
4/5This advanced interview task, highlighted by ByteDance, extends the traditional tree traversal challenge by asking you to locate the highest-scoring traversal route and reconstruct the exact node sequence. Handling negative values and branching paths requires sophisticated recursive tracking and state management. The exercise tests your deep comprehension of tree-based dynamic programming and pointer manipulation. Access to the full problem details and a production-grade model solution requires an active subscription.
Coding & Leetcode-style QuestionsByteDanceChain of Command
3/5Explore this organizational hierarchy challenge reported during interviews at IMC Trading. The task involves navigating a corporate tree structure to determine which employee receives a directive based on a specific propagation sequence and query parameter. This exercise tests your ability to handle tree traversal, parent-child relationships, and efficient indexing strategies. Access to the comprehensive problem statement and verified model solution requires a subscription.
Coding & Leetcode-style QuestionsIMC TradingBinary Tree Maximum Path Sum (Tree Kadane)
4/5Featured frequently in Adobe technical rounds, this tree-based challenge requires finding the maximum possible sum along any continuous path within a binary tree where nodes can hold negative integers. Unlike traditional root-to-leaf traversals, the path can start and end at arbitrary nodes, demanding a dynamic programming approach akin to Kadane's algorithm adapted for hierarchical structures. This problem thoroughly tests your recursion, tree manipulation, and optimal substructure identification skills. Get full access to the problem description and expert solution with a subscription.
Coding & Leetcode-style QuestionsAdobeBinary Search Tree Pruning
3/5Reported as a technical interview question at PayPal, this problem involves cleaning up a binary search tree by systematically removing all nodes that fall below a specified numerical threshold along with their descendant branches. The exercise examines your grasp of recursive tree traversal, conditional node deletion, and structural maintenance in hierarchical data types. Unlocking the complete problem details and verified model solution requires a subscription.
Coding & Leetcode-style QuestionsPayPalLongest Consecutive Path in Binary Tree
3/5Navigating tree structures to find sequential values is a classic algorithmic challenge frequently featured in technical evaluations at Google. This problem asks you to discover the longest continuous path where node values increment step-by-step, starting from parents and moving down to their descendants, with potential follow-up complexities involving multidirectional traversals. It tests your proficiency with recursive traversal patterns, depth-first search strategies, and state tracking across branches. Unlock full access to this challenge and its detailed model solution with a paid subscription.
Coding & Leetcode-style QuestionsGoogleBoolean Rule Parser and Evaluator
4/5Building a custom parser and evaluator for logical expressions is a sophisticated challenge reported during technical interviews at Stripe. Candidates must interpret complex conditional strings containing logical operators, nested parentheses, and comparison rules against a dynamic runtime context, respecting strict operator precedence and missing variable handling. This problem tests your compiler design skills, recursive descent parsing techniques, and evaluation logic. Access the detailed problem breakdown, syntax parsing strategies, and complete model implementation by obtaining a subscription.
Coding & Leetcode-style QuestionsStripeBasic Calculator with Operators, Variables, and Functions
3/5This reported Tesla interview question challenges you to build a comprehensive expression parser that starts with basic arithmetic and progressively incorporates advanced features such as exponentiation, grouping symbols, logical operators, variable assignments, and custom routines. This puzzle evaluates your ability to design robust interpreters and handle complex grammar rules efficiently. To explore the complete problem statement, comprehensive test cases, and an optimized reference solution, a subscription is required.
Coding & Leetcode-style QuestionsTeslaRegular Expression Matching
4/5Tackle a legendary string processing interview question commonly asked at Amazon, where you must determine if a text string matches a pattern containing wildcard symbols and repetition operators. This problem evaluates your command of dynamic programming and recursive state evaluation to handle ambiguous matching rules efficiently. Successfully solving it requires careful edge-case handling for zero-or-more occurrences and single-character placeholders. The comprehensive problem walkthrough and expert solution are available exclusively to subscribers.
Coding & Leetcode-style QuestionsAmazonEmployee Training Status + Group Tree Aggregation
3/5This Vanta interview problem requires you to evaluate employee compliance status regarding security training across specified windows and aggregate these metrics hierarchically across organizational group trees. You will build logic to compute exact overdue days for individuals and roll those statistics upward to calculate cumulative headcounts and total delays for overarching departments. The challenge tests your ability to handle date arithmetic alongside recursive tree traversal and data aggregation. Access the full problem details and a clean model solution by subscribing today.
Coding & Leetcode-style QuestionsVantaFence Painting Minimum Operations
3/5Reported from a Google coding interview, this challenge asks you to determine the minimum number of paint-roller operations needed to color a series of adjacent fence planks of varying heights. You can apply vertical strokes to individual planks or horizontal strokes across contiguous blocks, with each stroke carrying a fixed cost. The problem evaluates your greedy or dynamic programming skills to find the most efficient overlapping stroke strategy. Unlock the full problem details, complexity analysis, and model solution with a subscription.
Coding & Leetcode-style QuestionsGoogleNested List Weight Sum
2/5This frequently asked Amazon interview question challenges you to process hierarchically structured numerical data. You must compute a depth-weighted total by multiplying each embedded value by its specific level of nesting. The task is an excellent exercise for testing recursion, tree traversal, and depth-tracking algorithms. Unlock the complete problem statement and optimal model solution with a paid subscription.
Coding & Leetcode-style QuestionsAmazonConvert BST to Sorted Doubly Linked List (LC 426)
3/5Master a classic tree transformation task often asked during Pinterest interviews, which involves restructuring a binary search tree into a continuous, ordered circular doubly linked list in place. Beyond the core rearrangement, candidates must extend their logic to seamlessly insert new elements while preserving the sequential ordering property. This problem tests pointer manipulation mastery and recursive tree navigation skills. The complete problem statement, step-by-step guidance, and model solution require a subscription.
Coding & Leetcode-style QuestionsPinterestOrg-Chart Salary Aggregation
3/5This reported interview question from Amazon tests your ability to process hierarchical personnel datasets and compute aggregated metrics across management structures. Candidates are challenged to identify managerial tiers with distinct compensation patterns by first evaluating direct teams and then traversing broader reporting trees using efficient traversal techniques. You will need to carefully handle data groupings and clarify boundary conditions with your interviewer before writing code. To view the complete problem description and an optimal model solution, please unlock the full subscription.
Coding & Leetcode-style QuestionsAmazonPrint All Root-to-Leaf Binary Tree Paths
2/5In this tree traversal challenge reported from Capital One, candidates must explore hierarchical structures to discover every valid path from the root node down to the leaves. The exercise tests your grasp of recursive traversal strategies, state accumulation, and orderly result formatting following pre-order conventions. Handling edge cases such as sparse or unbalanced trees is essential for passing the evaluation. To examine the complete problem guidelines and the reference implementation, a paid subscription is necessary.
Coding & Leetcode-style QuestionsCapital OneCount Subtrees with Height-Diff <= 1 and Even Sum
3/5In this technical interview problem reported at eBay, candidates must analyze a binary tree structure to identify specific subtrees that satisfy dual structural and numerical conditions. The task tests your proficiency with recursive tree traversals, height balancing checks, and conditional value aggregation across nodes. You will need to carefully track subtree dimensions and parity constraints simultaneously to arrive at the correct count. The full problem and model solution require a subscription.
Coding & Leetcode-style QuestionseBayCalculate Total Size of Files in Nested Directories
2/5Explore how to traverse hierarchical file systems and compute cumulative byte counts in this Datadog interview question. Candidates will practice handling recursive data structures and aggregating numerical properties across arbitrary tree depths. This challenge evaluates tree traversal techniques and clean implementation habits. Access the complete problem description and model solution with a subscription.
Coding & Leetcode-style QuestionsDatadogEnumerate All Games of 4x4 Three-in-a-Row
3/5This Decagon interview question explores combinatorial game theory by asking you to enumerate all valid move sequences for a restricted board game variant. The challenge assesses your skills in recursive backtracking, state space search, and efficient termination tracking under custom winning conditions. You will need to handle deep branching factors while avoiding redundant state evaluations. Access the full problem details and algorithmic solution by purchasing a subscription.
Coding & Leetcode-style QuestionsDecagonExpression Add Operators — Left-to-Right Variant (LC 282)
3/5Featured in a Pinterest staff evaluation, this coding puzzle asks you to insert basic arithmetic operations into a numeric sequence to match a specified total under unique evaluation rules. Unlike standard mathematical convention, calculations proceed strictly from left to right, ignoring traditional operator priorities. Tackling this variant requires recursive backtracking combined with precise state tracking to discover all valid combinations. To view the complete problem breakdown and optimal solution, a paid subscription is required.
Coding & Leetcode-style QuestionsPinterestTree Preorder Merge
2/5Reported from Hudson River Trading interviews, this exercise requires combining two distinct binary trees by summing overlapping node values while preserving unique branches. Once the structures are successfully merged, you must traverse the resulting tree in a specific root-left-right order to generate the final collection of integers. This question evaluates your proficiency in recursive tree traversal and structural manipulation. The full problem details and optimal code solution require a subscription.
Coding & Leetcode-style QuestionsHudson River TradingDecode Morse Code to All Possible Original Strings
3/5This Oscar Health interview exercise challenges you to reverse-engineer a sequence of Morse code signals back into all possible alphabetical strings. Because dot-dash translations lack strict prefix boundaries, a single transmission can often map to multiple distinct letter combinations, requiring exhaustive exploration techniques. This task evaluates recursion, backtracking, and combinatorial string parsing abilities. To view the complete challenge and reference solution, a subscription is required.
Coding & Leetcode-style QuestionsOscar HealthWord Search + in-place marking optimization
3/5This algorithmic problem, highlighted during Turo recruitment loops, tests your ability to locate specific letter sequences within a two-dimensional character matrix. The exercise evaluates depth-first search traversal techniques alongside memory optimization strategies that modify the board state during execution without extra space. Mastering this puzzle sharpens your recursive tracking and state-reversal skills. Unlock the complete walkthrough and optimized implementation details by subscribing today.
Coding & Leetcode-style QuestionsTuroHyperparameter Combinations (Cartesian Product)
2/5This Pinterest interview question focuses on generating every possible configuration from a dictionary of tuning parameters and their respective candidate choices. You will explore how to compute full Cartesian products effectively in Python while considering robust test cases for validation. The task evaluates your fluency with combinatorial generation, nested iteration patterns, and clean utility design suited for machine learning platforms. Gain access to the full problem requirements, test suites, and optimal code by upgrading your subscription.
Coding & Leetcode-style QuestionsPinterestTwo Encoded Strings Describe the Same Original
4/5Solve a challenging string manipulation puzzle reported during Snowflake technical interviews. The objective is to determine whether two compressed string representations, where hidden segments are denoted by their numeric lengths, could potentially expand into the exact same original text. This problem evaluates your string parsing abilities, algorithmic thinking, and edge-case handling. The complete problem description, rigorous test suite, and clean model solution require a subscription.
Coding & Leetcode-style QuestionsSnowflakeExpression Add Operators to Reach Target
4/5Featured frequently in Google coding assessments, this algorithmic puzzle challenges you to insert mathematical operations between sequential digits to match a desired numerical target. Success requires navigating recursive state spaces and managing operator precedence constraints without violating formatting rules. Gain full access to the comprehensive solution and step-by-step code walkthrough with a subscription.
Coding & Leetcode-style QuestionsGoogleDepth-First Search on a Colored Graph
2/5Graph traversal techniques are put to the test in this Google interview challenge, which explores custom depth-first search implementations on node-colored networks. Developers must build an algorithm that traverses interconnected elements while adhering strictly to specific state-transition colors and simultaneously identifying circular paths. This problem evaluates graph theory proficiency, recursion management, and the ability to track node states dynamically during traversal. Unlocking the full problem description and comprehensive model solution requires a subscription.
Coding & Leetcode-style QuestionsGoogleReverse Nodes in k-Group (Incomplete Tail)
4/5Featured in ByteDance coding interviews, this problem requires you to reverse nodes in a linked list in fixed-size groups while leaving any remaining trailing nodes in their original order. The challenge specifically tests pointer manipulation skills, as you must relink nodes in-place without altering their underlying values. Reviewing the complete problem statement, pointer management strategies, and optimal model solution requires an active subscription.
Coding & Leetcode-style QuestionsByteDanceModified Basic Calculator
4/5In this Rokt interview question, candidates are challenged to build a robust arithmetic evaluator capable of processing standard mathematical operators and nested parentheses according to order of operations. The assignment tests string parsing proficiency, stack utilization, and numerical computation rules for integer arithmetic. Success requires careful handling of operator precedence and grouping symbols. Access the full problem specifications and optimal source code by subscribing to the platform.
Coding & Leetcode-style QuestionsRoktN-Queens
4/5Explore how to position multiple defensive pieces on a grid of variable size such that no two pieces threaten each other across rows, columns, or diagonals. Frequently featured in technical interviews at Snowflake, this classic challenge evaluates your mastery of recursive backtracking and state validation strategies. You will learn how to systematically explore potential configurations and generate all valid board setups. Access the complete problem description and expert model solution with an active subscription.
Coding & Leetcode-style QuestionsSnowflakeDesign a Spreadsheet with Dependent Cells (set_cell / get_cell)
3/5Encountered in Character AI interview processes, this design challenge requires building a lightweight spreadsheet system capable of handling dynamic cell relationships and automatic updates. You must implement mechanisms to assign static values, establish parent-child dependencies, and recursively compute aggregated results when data changes. This problem tests your expertise in graph modeling, caching strategies, and state propagation in an object-oriented design. Unlocking the complete problem specification and reference solution requires an active subscription.
Coding & Leetcode-style QuestionsCharacter AIJSON Path Query with Wildcards / Inverted Index
3/5This reported Netflix interview challenge requires you to build a custom query parser for navigating nested structured data using dot notation and wildcard matching. You will implement traversal logic to extract targeted values efficiently while handling missing keys gracefully. This problem evaluates your string manipulation capabilities, recursive thinking, and data structure navigation skills under interview conditions. Access to the complete problem breakdown and verified reference solution is available exclusively to subscribers.
Coding & Leetcode-style QuestionsNetflixJavaScript Flatten Recursion
2/5Reported as an Elastic interview task, this foundational JavaScript challenge requires writing a custom recursive function to flatten a deeply nested array containing mixed data types without relying on native flattening utilities. The problem tests your mastery of recursion, data type checking, and boundary condition handling for empty or irregularly structured collections. It serves as an excellent warm-up for evaluating core language fluency and algorithmic thinking. View the complete problem walkthrough and professional code solution with a paid subscription.
Coding & Leetcode-style QuestionsElasticCount All Tic-Tac-Toe Game Sequences
3/5Asked during Decagon interviews, this combinatorial puzzle asks you to compute every possible unique sequence of turns in a traditional grid game. Rather than just looking at final outcomes, you must track the chronological order of moves for both participants, accounting for early terminations triggered by winning alignments or full boards. It examines your depth-first search strategy and combinatorial counting skills. To view the complete problem statement and reference solution, a subscription is required.
Coding & Leetcode-style QuestionsDecagonGood Binary Strings
4/5This BNP Paribas interview challenge requires examining specific characteristics of binary sequences based on balance and prefix constraints. Candidates are tested on their ability to manipulate strings and evaluate structural validity efficiently. The task evaluates foundational algorithmic thinking and combinatorial reasoning. Access to the complete problem breakdown and the optimized reference solution requires an active subscription.
Coding & Leetcode-style QuestionsBNP ParibasPrint Directory Tree Given a File Path
3/5This Adobe interview challenge asks developers to traverse a nested data structure representing a hierarchical file system and output a visually formatted tree of directories and files. The task evaluates recursion, string manipulation, and error handling for missing or unexpected path types. Building a clean, indented visual representation tests fundamental tree traversal skills under structured constraints. Unlock the full problem description and expert reference solution by subscribing today.
Coding & Leetcode-style QuestionsAdobeCompute Total Size of a File System
2/5This classic Google interview question requires calculating the aggregate storage space consumed by all files within a hierarchical file system directory tree. Candidates must navigate nested directories and files efficiently to ensure every component is accounted for without duplication. The exercise tests foundational tree traversal algorithms and recursive programming techniques. Access the complete problem statement and optimized model solution with a paid subscription.
Coding & Leetcode-style QuestionsGoogleComment System Formatting
3/5This interview question, frequently asked at Nextdoor, challenges candidates to format and display hierarchical data structures with proper indentation levels. The task tests your ability to handle tree-like relationships, parse parent-child identifiers, and manage missing nodes by leaving empty placeholders while preserving the structure of subsequent descendants. You will need to implement an efficient traversal algorithm that correctly orders the elements. Unlock the complete problem description and an optimal model solution by acquiring a subscription.
Coding & Leetcode-style QuestionsNextdoorDecode String (k[encoded]) (LC 394)
3/5Featured in an Oracle technical screening, this classic coding problem asks you to process and expand a text sequence governed by nested repetition rules. The task assesses your proficiency with stack-based data structures, string manipulation, and parsing algorithms. You must carefully manage embedded segments and repeat counts to rebuild the original text correctly. Unlock the full problem details and optimal implementation by subscribing to our platform.
Coding & Leetcode-style QuestionsOracleBinary Tree Longest Consecutive Sequence II
3/5Discover how to determine the longest unbroken sequence of adjacent values that differ by one within a hierarchical tree structure. Reported as an interview challenge at Uber, this problem evaluates your grasp of tree traversal techniques, recursive state management, and bidirectional path tracking. Candidates must handle both ascending and upward-downward transitions smoothly. Unlock the full problem description, algorithmic walkthrough, and optimal code implementation by upgrading to a paid subscription.
Coding & Leetcode-style QuestionsUber
Studied alongside
recursion interview FAQ
- How many recursion interview questions are there?
- 98 reported questions, mostly Coding & Leetcode-style Questions.
- Which companies ask recursion questions?
- Snowflake (9), Google (9), Amazon (9), Uber (7), Meta (3), Pinterest (3), Databricks (2), Oracle (2).
- How hard are recursion questions?
- They average 2.9 out of 5: 1 at 1/5, 18 at 2/5, 64 at 3/5, 15 at 4/5.