dp Interview Questions
59 interview questions in our bank cover dp, most of them Coding & Leetcode-style Questions. They average 3.3/5 difficulty — medium — and each one was reported by a candidate after a real interview. Companies known to ask about dp: Amazon, Uber, Google, Databricks, Citadel, and 15 more.
Practice these on the problems board →Companies that ask about dp
Question mix
- Coding & Leetcode-style Questions59
Difficulty
- 2/5 — easy3
- 3/5 — medium37
- 4/5 — hard18
- 5/5 — very hard1
Questions tagged dp
Campaign Cost Weekly Partition
3/5This Salesforce coding interview question challenges you to organize an array of promotional expenses into a fixed number of contiguous sequential periods. The objective is to minimize the accumulated peak costs across all designated intervals by strategically dividing the dataset. It evaluates your grasp of advanced array manipulation and optimization strategies. To explore the full problem statement along with a fully implemented model solution, please consider subscribing to our platform.
Coding & Leetcode-style QuestionsSalesforceHouse Robber: Linear, Circular, and Gap Variants
3/5This classic dynamic programming problem, featured in Databricks interviews, explores optimization strategies where selecting adjacent items is forbidden. You will need to determine the maximum cumulative value obtainable under strict exclusion rules. The exercise extends beyond the linear baseline into circular arrangements, hierarchical tree structures, and customized spacing constraints that significantly alter the state transitions. Unlock the complete breakdown and optimal algorithmic implementation by grabbing a subscription.
Coding & Leetcode-style QuestionsDatabricksStock Transaction Sequence Counting (Catalan / DP)
3/5Prepare for quantitative software engineering roles with this Optiver interview problem centered on tracking valid transaction sequences without falling into a negative balance. This challenge tests your grasp of advanced combinatorics, dynamic programming, and Catalan number applications common in market-making simulations. You must determine the exact count of admissible permutations under specific boundary rules efficiently. Unlock the detailed problem walkthrough and optimal code solution by purchasing a subscription.
Coding & Leetcode-style QuestionsOptiverFile 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 QuestionsDatabricksMaximal Square and Maximal Rectangle in Binary Matrix
3/5Explore a classic two-dimensional matrix analysis challenge commonly asked by Databricks, focusing on identifying maximal uniform regions within binary data grids. This problem tests your ability to apply dynamic programming principles efficiently to compute the largest square and rectangular boundaries composed entirely of matching elements. Candidates must optimize spatial memory usage and runtime complexity while evaluating subgrid states. Access the complete problem description, analysis, and clean model solution through our subscription plan.
Coding & Leetcode-style QuestionsDatabricksMinimum Substring Partition Covering Target String
4/5Analyze a complex string parsing challenge that requires reconstructing a target sequence using the fewest possible continuous segments from a source text, frequently asked during technical evaluations at Databricks. This problem evaluates your advanced string processing, greedy algorithms, and dynamic programming skills to find optimal index ranges under strict constraints. You will also consider dynamic modifications and edge cases where coverage might fail. The complete problem statement and optimized solution are available exclusively with a paid subscription.
Coding & Leetcode-style QuestionsDatabricksLayover Experiences — Exact-Fill with Min Count
3/5In this engaging algorithmic puzzle frequently encountered during Airbnb technical screenings, applicants must calculate the fewest possible item selections needed to reach an exact numerical target sum using a given set of repeatable values. This scenario evaluates dynamic programming and backtracking concepts, requiring candidates to handle optimization constraints effectively while avoiding common performance traps. Mastering this challenge sharpens your ability to tackle complex resource allocation dilemmas. Unlock the full problem breakdown and clean model implementation by obtaining a subscription.
Coding & Leetcode-style QuestionsAirbnbSki Path — Max Score on a Weighted DAG
3/5This Airbnb interview question requires finding the optimal traversal path on a weighted directed acyclic graph to maximize cumulative rewards while minimizing associated costs. You will practice pathfinding algorithms tailored for graphs with node rewards and edge weights leading to multiple potential destinations. The problem tests dynamic programming on DAGs, topological sorting, and path reconstruction techniques. The full problem statement, test scenarios, and verified model solution require a subscription.
Coding & Leetcode-style QuestionsAirbnbConcatenated Words with All Decompositions
4/5Reported as an Amazon coding assessment, this challenge requires identifying specialized vocabulary items that can be formed by combining multiple smaller entries from a provided lexicon. You must generate all valid structural breakdowns for each matching term while maintaining strict lexicographical ordering rules. The exercise evaluates advanced string parsing algorithms and combinatorial depth. View the complete problem details and optimal programmatic solution by getting a subscription.
Coding & Leetcode-style QuestionsAmazonBest Time to Buy and Sell Stock
2/5Mastering financial sequence analysis is essential for technical evaluations, as highlighted by this popular Meta interview question. You are asked to determine the optimal timing for purchasing and liquidating an asset to maximize financial gain based on historical valuation lists. The challenge also includes handling follow-up scenarios involving multiple transaction opportunities while maintaining strict inventory limits. Understanding how to track running minimums and accumulate profitable intervals efficiently is key to passing. Accessing the comprehensive problem breakdown and verified model solution requires an active subscription.
Coding & Leetcode-style QuestionsMetaMorse Code Encoder/Decoder with Word-Break
5/5Explore advanced text transformation and segmentation techniques blending code translation with backtracking logic, as featured in technical interviews at Amazon. This problem requires building index maps and decomposing ambiguous, delimiter-free symbol sequences back into every valid textual combination. Upgrade to a full subscription to view the entire problem description and optimal code solution.
Coding & Leetcode-style QuestionsAmazonOA: Jump Game with Prime-3 Steps
4/5Featured in an Uber online assessment, this advanced algorithmic problem builds upon classic path-finding challenges by introducing dynamic movement constraints based on prime numbers ending in a specific digit. Candidates must navigate an array containing both positive and negative values to maximize their accumulated score while adhering to strict transition rules. The problem evaluates advanced dynamic programming techniques and sliding window optimizations. Unlock the complete problem breakdown and the detailed model solution by purchasing a subscription.
Coding & Leetcode-style QuestionsUberString 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 QuestionsMathWorksThree-Column Grid Coloring Count
3/5This reported Intuit interview question challenges candidates to determine the total number of valid color combinations for a narrow rectangular grid using a limited palette. The core task evaluates proficiency in efficient dynamic programming techniques to manage sequence dependencies and state transitions under large scaling constraints while producing results modulo a prime number. Handling spatial exclusion rules without brute-force enumeration forms the crux of the evaluation. Access to the full problem description and expert model solution requires a subscription.
Coding & Leetcode-style QuestionsIntuitDomino Tiling Recurrences (2xN and 3xN)
3/5Frequently featured in JPMorgan quantitative finance screenings, this problem explores combinatorial counting and mathematical induction through grid tiling scenarios. You will need to determine the number of ways to cover rectangular boards using smaller blocks, moving from standard two-row layouts to more complex multi-row variations. The core objective is to derive the underlying recurrence relations rather than simply memorizing numerical sequences. The full problem and model solution require a subscription.
Coding & Leetcode-style QuestionsJPMorganRussian Doll Envelopes
3/5Tackle a popular geometric nesting problem frequently featured in technical interviews at Google, where you must calculate the maximum chain length of two-dimensional objects that can be sequentially nested inside one another. This puzzle tests your ability to combine multi-level sorting strategies with dynamic programming optimizations to achieve an efficient runtime complexity. Mastering the nuances of dimension ordering and subsequence reduction is essential for success. Unlocking the full problem walkthrough and expert code implementation requires a subscription.
Coding & Leetcode-style QuestionsGoogleHouse Robber II
3/5Conquer a classic dynamic programming challenge featured in Amazon technical interviews, where residential buildings are arranged in a closed loop, introducing circular adjacency constraints to asset protection. You must determine the highest possible cumulative value you can extract without triggering alarms by robbing adjacent properties. This problem builds directly upon linear sequence optimization by requiring candidates to decompose the circular dependency into manageable sub-problems. Unlock the full algorithmic breakdown, complexity analysis, and verified model solution with a subscription.
Coding & Leetcode-style QuestionsAmazonLargest Square of 1's
3/5In this coding challenge reported during FactSet interviews, you are tasked with examining a grid containing binary values to locate and measure the largest contiguous submatrix made entirely of specific target elements. This problem tests your spatial reasoning and dynamic programming abilities on two-dimensional arrays. To view the complete problem instructions and the optimal source code implementation, a subscription is required.
Coding & Leetcode-style QuestionsFactSetBest Time to Buy and Sell Stock — Full DP Ladder
3/5Master this multi-tiered dynamic programming progression frequently featured in rigorous Citadel technical screenings. You will advance through increasingly complex scenarios, starting from a single allowable trade, moving to unlimited transactions, and finally scaling up to a bounded number of buy and sell operations. This structured challenge tests your state definition clarity, space-time optimization, and ability to handle edge cases gracefully as constraints tighten. Elevate your algorithmic expertise by preparing for multi-state financial trading models. Gain immediate access to the detailed problem statements, rigorous complexity analysis, and complete model solutions with our paid subscription.
Coding & Leetcode-style QuestionsCitadelMaximum Independent Set on a Tree
4/5Examine this classic graph theory challenge featured in software engineering interviews at Two Sigma. The task involves finding the largest possible subset of nodes within a hierarchical network such that no two chosen elements share a direct connection. This problem tests your expertise in dynamic programming on trees and optimizing independent sets under structural constraints. Working through this scenario enhances your ability to design efficient algorithms for complex relationship networks. The complete problem statement and model solution require a subscription.
Coding & Leetcode-style QuestionsTwo SigmaDecode Ways
3/5This classic combinatorial problem, frequently asked at Goldman Sachs, requires you to calculate the total number of valid alphabetical decodings for a given numeric string based on standard letter-to-number mappings. It tests your dynamic programming intuition and edge-case management, particularly regarding zero-handling and single- versus double-digit conversions. The complete problem statement, underlying logic, and optimal code solution are available exclusively to subscribers.
Coding & Leetcode-style QuestionsGoldman SachsTree 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 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 QuestionsCitadelStock Trading Profit Calculator
3/5This classic financial optimization puzzle, often posed by Amazon, requires calculating the maximum financial gains achievable from asset fluctuations under varying operational constraints such as transaction fees and execution limits. You will need to implement efficient scanning algorithms or dynamic programming states to determine optimal buy and sell points across extensive timelines. The exercise tests your capacity to translate business rules into high-performance computational logic. The full problem and model solution require a subscription.
Coding & Leetcode-style QuestionsAmazonMinimum Insertions / Deletions Password Update
3/5This Cisco interview problem examines your string transformation skills by finding the minimum edit distance using only insertions and deletions. Given an initial string and a target value, you must determine the fewest character modifications necessary to bridge the gap between them. The exercise evaluates dynamic programming principles and string manipulation proficiency under strict constraints. Access to the complete problem description and an optimal model solution requires a subscription.
Coding & Leetcode-style QuestionsCiscoMenu — Minimum Cost to Cover Wanted Items
3/5This Airbnb interview question explores combinatorial optimization and subset selection strategies to solve a budget-minimization puzzle. Given a catalog of overlapping product bundles with individual price tags, your objective is to select the most cost-effective combination of packages that entirely satisfies a specified collection of desired items. The challenge tests your proficiency with dynamic programming or search algorithms under constrained input sizes. Reviewing the complete problem context, constraints, and algorithmic solution demands an active subscription.
Coding & Leetcode-style QuestionsAirbnbPerfect Squares Decomposition (Shortest Path)
3/5This Pinduoduo interview challenge requires expressing a given integer as a sum of the fewest possible square numbers while also reconstructing one valid combination of those terms. It tests your ability to optimize structural paths and manage greedy or dynamic choices efficiently under strict numerical bounds. Access to the complete problem breakdown and optimal implementation requires a paid subscription.
Coding & Leetcode-style QuestionsPinduoduoMax GPUs with At Most K Switches Between Clusters
3/5In this Mistral AI coding challenge, candidates must compute the optimal resource allocation across multiple resource pools over a defined temporal window while strictly limiting transition frequencies. This problem tests dynamic programming and state transition optimization under restrictive bounds. You will design an algorithm that balances cumulative yield against mobility penalties. Unlock the complete problem statement and verified solution by getting a subscription.
Coding & Leetcode-style QuestionsMistral AINon-Consecutive Process Allocation Counting (Modulo 1e9 + 7)
2/5This Citadel assessment problem asks you to calculate valid scheduling permutations across consecutive time slots with adjacency restrictions. It evaluates combinatorial reasoning and fast modular arithmetic techniques to handle large numerical outputs. You will formulate a recurrence relationship to efficiently count non-overlapping configurations. The full problem breakdown and optimal code implementation require a subscription to access.
Coding & Leetcode-style QuestionsCitadelMaximum Non-Adjacent Chocolates
2/5Dynamic programming fundamentals are often tested in technical evaluations at major tech enterprises like Cisco. This engaging puzzle asks you to calculate the maximum collectible items from a sequential row of storage units while strictly avoiding any adjacent selections. The challenge evaluates your ability to recognize overlapping subproblems and construct an efficient recurrence relation to optimize resource gathering. The complete problem description and professional model solution are available exclusively to subscribers.
Coding & Leetcode-style QuestionsCiscoDNA Substring Palindrome Cost Sum
3/5Tackle an advanced string transformation puzzle reported in technical screening sessions at Intuit. This problem requires you to analyze genetic sequences, computing the cumulative effort needed to transform every possible segment into a symmetrical format. It tests your mastery of dynamic programming, interval optimization, and reducing cubic complexity down to efficient polynomial bounds. Unlock the complete problem description, step-by-step methodology, and expert-crafted model solution by acquiring a paid subscription.
Coding & Leetcode-style QuestionsIntuitLongest Subsequence of X That Is a Substring of Y
3/5Combining string subsequences and contiguous matching constraints forms the core of many advanced text-processing assessments. Featured in a Salesforce technical screening, this problem challenges you to find the longest character sequence from one string that simultaneously exists as a contiguous segment inside another. The evaluation tests your proficiency with dynamic programming states and sequence alignment logic under strict performance bounds. Access the full problem walkthrough and model solution by securing a subscription today.
Coding & Leetcode-style QuestionsSalesforceMaximum Product Path in a Complete Directed Graph
4/5Reported as a rigorous technical assessment for Two Sigma, this graph theory challenge asks you to determine a unique path across a complete directed structure that maximizes the total product of edge weights without revisiting nodes. It tests advanced algorithmic concepts, including logarithmic transformations to convert multiplicative objectives into additive ones, alongside dynamic programming with bitmasking. Access to the full problem text, complexity analysis, and verified model solution requires a subscription.
Coding & Leetcode-style QuestionsTwo Sigma01 Matrix
3/5This Snowflake reported interview question gives you a grid filled with binary values and requires you to compute the shortest path distance from every single location to the nearest zero cell. You will need to implement a multi-source breadth-first search algorithm to propagate distances outward efficiently across the matrix in optimal time. This problem effectively tests your graph traversal skills and spatial reasoning on grids. Access to the complete problem breakdown and expert model solution requires an active subscription.
Coding & Leetcode-style QuestionsSnowflakeBinary 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 QuestionsByteDanceCount Perfect Wake Numbers up to N
4/5Solve a combinatorial counting puzzle featured in technical screenings at Google. The objective is to compute the total number of integers up to a given upper bound that satisfy strict digit uniqueness and local extrema constraints. This problem tests your expertise in digit manipulation, combinatorics, and efficient range-counting algorithms. The complete problem statement and optimized model solution require a subscription.
Coding & Leetcode-style QuestionsGoogleFactory Minimum-Cost Path Across Stages
3/5Highlighted as a notable Stripe interview question, this optimization challenge asks you to find the minimum cost path across sequential production stages involving both establishment expenses and transit distances. It tests your capability to apply dynamic programming principles, manage multi-variable state transitions, and handle structural modifications like skipping a stage. You will need to design an efficient algorithm to navigate the cost tradeoffs effectively. Gain full access to the complete problem text, detailed constraints, and the verified model solution with a paid subscription.
Coding & Leetcode-style QuestionsStripeMinimum-Cost Path on a Grid with Fuel and Recharge Cells
4/5Reported from ByteDance interviews, this advanced pathfinding challenge introduces resource management constraints to a standard grid traversal problem. Navigating from the start to the target incurs varying traversal costs while depleting a limited resource pool, which can only be replenished at designated recharge checkpoints and impassable obstacles must be avoided. The goal is to compute the most economical route under strict capacity limits. Review the complete problem statement, state-space modeling strategies, and optimal solution by upgrading to a paid subscription.
Coding & Leetcode-style QuestionsByteDanceNumber of Ways to Earn Points
3/5This Uber interview question tests your ability to calculate combinatorial possibilities using dynamic programming techniques. Given various categories of items with distinct point values and quantities, you must determine how many unique combinations sum up to a precise target score. The problem evaluates your understanding of knapsack-style state transitions and modulo arithmetic operations. Gain access to the complete problem statement and an optimal model solution by purchasing a subscription.
Coding & Leetcode-style QuestionsUberSum of Compressed Number for All Subarrays
4/5Featured in coding evaluations at Wells Fargo, this advanced problem explores subarray compression and combinatorial counting. You are asked to analyze an integer array by collapsing consecutive duplicate elements and computing specific subsequence reduction metrics across all possible contiguous segments. This task tests deep combinatorial insight and efficient range query handling. Gain access to the full problem description, mathematical analysis, and optimal programmatic solution with a paid subscription.
Coding & Leetcode-style QuestionsWells FargoFood Delivery System (Multi-Level Coding)
3/5Tackle a comprehensive multi-stage architectural coding challenge featured in Coinbase interview loops, centered around designing a functional food delivery network. Candidates must progress through foundational data organization using hash maps, advance to logarithmic range queries via binary search, and conclude with an optimization puzzle reminiscent of the knapsack problem. This task thoroughly assesses your ability to scale code and merge diverse algorithmic paradigms efficiently. Access the full problem details and complete verified model solution by obtaining a subscription.
Coding & Leetcode-style QuestionsCoinbaseJump Game with Profit
3/5This intriguing Google interview question challenges you to maximize your accumulated earnings while traversing an array by deciding whether to claim specific bonuses at each index or bypass them for alternative paths. It effectively evaluates your ability to combine greedy choices with dynamic programming strategies to optimize sequential decisions. You will need to carefully reason about backward propagation to compute the optimal outcome. To explore the complete problem statement, constraints, and a fully explained model solution, a subscription is required.
Coding & Leetcode-style QuestionsGoogleRegular 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 QuestionsAmazonFence 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 QuestionsGoogleCitadel QD On-Site Coding Ladder (3 Rounds, 3-4 Problems Each)
3/5Step inside a reported Citadel quantitative developer on-site assessment featuring a high-pressure sequence of technical interview sessions. Candidates must navigate rapid-fire rounds crammed with multiple algorithmic challenges, balancing difficult coding hurdles under strict time constraints. The evaluation heavily prioritizes consistent momentum, swift problem breakdown, and adaptability over achieving flawless completion rates. Discovering how to pace yourself effectively through these demanding hurdles is essential for clearing top-tier financial tech screens. Unlock your subscription to access comprehensive breakdowns and expert preparation strategies.
Coding & Leetcode-style QuestionsCitadelMax Subsequence Sum Without Skipping Two in a Row
3/5In this technical interview question shared by candidates interviewing at Akuna Capital, you must determine an optimal subset of numeric values to maximize the cumulative sum while adhering to a strict constraint against bypassing consecutive items. This task tests your capability to apply dynamic programming principles, design state transition logic, and handle boundary conditions efficiently within sequential datasets. Solving this puzzle enhances your skill in recognizing overlapping subproblems and formulating optimal substructures. Unlock the full problem breakdown, detailed explanations, and a complete code solution with a paid subscription.
Coding & Leetcode-style QuestionsAkuna CapitalSWE / SDE Intern Coding OA (DP + C++/Ruby)
3/5Prepare for a multi-part technical coding assessment recently featured in Shopify intern hiring processes, spanning dynamic programming and language-specific utilities in C++ and Ruby. The timed evaluation tests adaptability across distinct paradigms, combining algorithmic optimization with concise string manipulation and collection filtering tasks. Success requires efficient time management and fluency in multiple programming environments. Access to the full exam breakdown and model solutions requires a subscription.
Coding & Leetcode-style QuestionsShopifyOptimal Execution with a Broker Backstop
4/5This advanced Optiver coding problem presents an optimal stopping challenge framed around sequential purchasing decisions under uncertainty. Candidates must determine the ideal strategy to acquire multiple units of an asset while balancing random market fluctuations against a limited number of fallback options provided by a broker. This task assesses your command of dynamic programming and expected value calculations in a high-frequency trading context. The complete problem statement, mathematical formulation, and optimal solution are available exclusively to paid subscribers.
Coding & Leetcode-style QuestionsOptiverTree Distance Sum (Re-root DP)
4/5Reported as a Google onsite coding challenge, this problem requires calculating the sum of shortest-path distances from every single node to all other vertices in an undirected tree. You will explore an initial naive traversal approach before optimizing toward an efficient linear-time solution using advanced tree dynamic programming techniques often known as re-rooting. Solving this task highlights your mastery of tree properties and dynamic programming optimization strategies. Read the full problem specification and examine the complete reference solution with a subscription.
Coding & Leetcode-style QuestionsGoogleRace Car: Minimum Instructions to Reach a Target
4/5This Waymo interview question, matching the standard race car challenge, asks you to determine the absolute minimum number of acceleration and reversal instructions needed for a vehicle to reach a specific target coordinate. You will need to model position and velocity transitions across a state space, carefully weighing choices to avoid overshooting the destination. Solving this puzzle demonstrates your expertise in advanced search algorithms and state-space optimization techniques. To see the full problem description and optimal model implementation, subscribe today.
Coding & Leetcode-style QuestionsWaymoMinimum Edge Reversals from Every Root
4/5Navigate complex tree transformations in this advanced graph problem reported during an Uber interview. You are tasked with finding an optimal root placement that minimizes edge direction adjustments to ensure reachability across all nodes. This problem tests advanced tree dynamic programming and rerooting algorithmic patterns. Access the full problem details and expert solution with a subscription.
Coding & Leetcode-style QuestionsUberWord Break
3/5This reported Uber interview question evaluates your ability to determine if a given text can be completely partitioned using a provided vocabulary of terms. Candidates must efficiently evaluate whether valid combinations of dictionary elements can reconstruct the target sequence without leaving any leftover characters. This puzzle heavily tests fundamental string manipulation and dynamic programming paradigms. Access to the comprehensive problem breakdown and verified model solution requires an active subscription.
Coding & Leetcode-style QuestionsUberMouse and Cheese: Grid Reward Maximization
3/5This Meta interview question presents a fascinating challenge involving pathfinding and reward maximization within a grid environment, offering two distinct variants. The first variant requires you to navigate a known grid from a starting point to an end point, moving only right or down, to collect the maximum possible total reward from cells. The second variant shifts to an unknown maze, where you must explore using a limited API to locate and collect cheese, typically employing search algorithms like DFS with backtracking. This problem effectively tests your dynamic programming skills or graph traversal strategies. The full problem description and a model solution are available with a subscription.
Coding & Leetcode-style QuestionsMetaNumber of Ways to Wear Different Hats to Each Other
4/5Tackle a sophisticated combinatorial matching challenge reported in Uber coding interviews that evaluates advanced algorithmic reasoning. You need to compute all distinct assignment permutations ensuring that multiple participants each receive a preferred item without any duplicates, constrained by categorical preferences. This puzzle tests your proficiency with backtracking strategies optimized via bitmasking and dynamic programming. Unlock the comprehensive walkthrough and verified code solution by becoming a subscriber.
Coding & Leetcode-style QuestionsUberTwo 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 QuestionsSnowflakeStock Transaction Sequence Counting (Catalan / DP)
3/5This quantitative assessment problem, reported during recruitment rounds at Optiver, challenges candidates to count valid transaction sequences that maintain proper balance without dipping into negative totals. Relying on advanced combinatorics, counting principles, and dynamic programming techniques, this exercise tests your ability to model state transitions accurately. Access to the full problem description and its detailed model solution requires a paid subscription.
Coding & Leetcode-style QuestionsOptiverCount the Longest Increasing Subsequences
3/5Calculating sequence properties efficiently is a staple of dynamic programming interviews, as demonstrated in this challenge reported from Pinduoduo. You are asked to determine the exact quantity of maximal strictly increasing sequences within an unsorted array of numbers without falling into exponential time traps. This task evaluates your mastery of optimized subsequence algorithms and state transition tracking. Gain full access to the complete problem text and professional solution by subscribing today.
Coding & Leetcode-style QuestionsPinduoduoBucket Batching DP to Minimize GPU Padding
4/5This Amazon interview challenge involves optimizing resource allocation using dynamic programming to group variable-length items into fixed batches while minimizing overall padding waste. Candidates must sort numeric elements and partition them into contiguous segments where cost is determined by group size and maximum element length. The task tests advanced optimization strategies, subproblem decomposition, and efficiency in handling combinatorial partitions. Detailed problem specifications and a reference implementation are locked behind a paid subscription.
Coding & Leetcode-style QuestionsAmazonMinimum Cost Over 0/1/! Subsequence Assignments
4/5Examine this intricate Amazon reported interview question that requires finding the optimal substitution strategy for wildcard characters within a restricted alphabet string. The challenge evaluates your advanced algorithmic skills, dynamic programming proficiency, and ability to minimize specific pattern creation costs efficiently. You will explore combinatorial states and string transformations under strict optimization criteria. Unlock the complete problem context and detailed reference implementation with a paid subscription.
Coding & Leetcode-style QuestionsAmazon
Studied alongside
dp interview FAQ
- How many dp interview questions are there?
- 59 reported questions, mostly Coding & Leetcode-style Questions.
- Which companies ask dp questions?
- Amazon (7), Uber (5), Google (5), Databricks (4), Citadel (4), Optiver (3), Airbnb (3), Snowflake (3).
- How hard are dp questions?
- They average 3.3 out of 5: 3 at 2/5, 37 at 3/5, 18 at 4/5, 1 at 5/5.