Dynamic Programming Interview Questions
196 interview questions in our bank cover Dynamic Programming, most of them Coding 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 Dynamic Programming: Amazon, Google, Snowflake, Uber, Meta, and 15 more.
Practice these on the problems board →Companies that ask about Dynamic Programming
Question mix
- Coding Questions195
- LLMs & Prompt Engineering1
Difficulty
- 1/5 — warm-up1
- 2/5 — easy11
- 3/5 — medium121
- 4/5 — hard63
Dynamic Programming questions at Amazon
Optimal Bucket Batching to Minimize Padding
4/5This advanced optimization problem, reported during software engineering interviews at Amazon, requires partitioning a collection of item lengths into a fixed number of groups to minimize total padding waste. Within each group, items are padded to match the maximum length present in that specific batch. This task tests your expertise in dynamic programming, sorting strategies, and cost-minimization algorithms under strict constraints. The complete problem statement and detailed algorithmic solution require a subscription to access.
Coding QuestionsAmazonLongest Valid Parentheses Span
4/5Master sequence manipulation and index tracking with this intriguing interview challenge frequently featured by Amazon. Candidates are tasked with evaluating sequences of bracket characters to locate the most expansive valid section and calculating its span based on boundary positions. This exercise evaluates your ability to optimize linear scans and maintain state efficiently using stacks or dynamic programming techniques. To access the complete problem statement, optimal algorithms, and thoroughly explained model code, unlock the full guide with a subscription.
Coding QuestionsAmazonLongest Path in a DAG
4/5Master a fundamental graph theory problem frequently featured in Amazon coding interviews, requiring you to determine the longest traversal route within a directed acyclic graph. This challenge tests your mastery of topological sorting, dynamic programming, and efficient pathfinding across dependency networks. The complete problem statement, underlying algorithmic theory, and fully documented model solution require an active subscription.
Coding QuestionsAmazonUnique Paths in a Grid
2/5Explore this classic grid traversal puzzle frequently featured in technical interviews at Amazon, where you must determine the total number of unique routes across a matrix from the top-left corner to the bottom-right destination. Movement is strictly restricted to rightward and downward steps, turning the challenge into an exercise in combinatorics or dynamic programming optimization. You will evaluate how to compute these configurations efficiently without redundantly recalculating sub-paths. Unlock the full problem breakdown, optimal algorithmic approaches, and clean reference code with a subscription.
Coding QuestionsAmazonDNA Similarity via Longest Common Subsequence
3/5This Amazon interview question challenges you to measure the genetic similarity between two biological strings by determining their longest common subsequence. The task requires a dynamic programming approach to efficiently compare sequence alignments and compute the optimal overlap length. Practicing this problem helps strengthen your grasp of classical sequence matching algorithms frequently encountered in technical screenings. Unlock the full problem description, complexity analysis, and working solution with a subscription.
Coding QuestionsAmazonBest Time to Buy and Sell Stock With Two Transactions
4/5Optimizing sequential decisions over time is a classic algorithmic theme highlighted in this interview question reported from Amazon. Given a chronological series of valuation metrics, the objective is to determine the maximum financial gain achievable through a restricted number of buy and sell operations. This puzzle evaluates your proficiency with dynamic programming state transitions and efficient array scanning strategies. Reviewing the comprehensive problem details and clean reference implementation demands an active subscription.
Coding QuestionsAmazonMinimum Energy to Collect Bags From Both Ends
4/5In this engaging algorithmic puzzle frequently encountered during Amazon technical rounds, candidates must determine the most cost-effective strategy for gathering items sequentially from opposing ends of a collection. Each choice incurs varying expenses based on directional weight multipliers and directional continuity penalties. Devising an optimal strategy demands dynamic programming or advanced greedy approaches to compute the minimal total expenditure accurately. Sharpen your algorithmic thinking and master complex state-transition strategies by reviewing the complete breakdown. Unlock full access to view the comprehensive problem description and optimal solution code.
Coding QuestionsAmazonMaximum Weighted Path Sum in a DAG
3/5Optimizing pathways through directed acyclic graphs is a classic challenge often highlighted in rigorous engineering interviews at companies like Amazon. This task requires you to compute the maximum cumulative weight across all valid directed trajectories within a weighted network. You will need to combine topological sorting principles with dynamic programming to evaluate dependencies efficiently. Unlock the full problem context and an optimal step-by-step solution by subscribing today.
Coding QuestionsAmazonHouse Robber
2/5This classic dynamic programming challenge, frequently featured in technical interviews at Amazon, requires you to calculate the maximum possible bounty from a row of assets without triggering alarms in back-to-back properties. You will need to efficiently evaluate choices by weighing current gains against neighboring constraints to optimize your overall haul. Discovering the optimal strategy and examining the complete model solution require a paid subscription.
Coding QuestionsAmazonMinimum Cost with Bundles/Offers
3/5A coding question about buying an exact shopping list at the lowest price when repeatable bundle deals compete with unit prices. No bundle may push any item past the quantity required.
Coding QuestionsAmazonMaximum Load Within Capacity
3/5This Amazon interview challenge requires you to determine the optimal subset of item weights that can be accommodated within a fixed transport limit without exceeding its threshold. It evaluates your grasp of classic subset-sum and knapsack optimization principles to maximize utilization. Unlocking the complete problem guidelines, test suites, and the most efficient algorithmic solution requires a paid subscription.
Coding QuestionsAmazonMinimum Cost to Buy Books From Both Ends
4/5This Amazon interview scenario asks you to find the cheapest way to acquire items arranged sequentially when you can purchase items individually from either end or in discounted pairs up to a limited number of times. The challenge tests your grasp of dynamic programming and state transition optimization. Get the full problem text and complete model solution with a subscription.
Coding QuestionsAmazonMinimum Path Sum in a Grid
2/5This classic coding challenge, frequently featured in interviews at Amazon, requires finding the optimal traversal path through a numeric grid from the top corner to the bottom corner. Restricted to moving only right and downward, candidates must compute a route that minimizes the cumulative sum of visited cells. The exercise evaluates foundational dynamic programming and matrix traversal skills. Unlock the complete problem description, complexity analysis, and verified model solution with a paid subscription.
Coding QuestionsAmazonMinimum Deletions to Empty a String
4/5This interview challenge reported at Amazon evaluates your ability to process sequential string data efficiently by finding the fewest steps needed to clear out matching consecutive characters. Candidates must design an optimized algorithm that handles substring reductions and tests advanced string manipulation skills under tight performance constraints. Access to the complete problem breakdown and expert model solution requires a subscription.
Coding QuestionsAmazonMaximum Alternating Subsequence Sum
3/5This dynamic programming challenge, inspired by Amazon interview questions, requires you to find the maximum possible alternating sum from a chosen subsequence of an integer array while preserving the original relative order. The question tests your ability to optimize alternating sequence selections efficiently using state tracking. Access the complete problem statement and optimal solution by acquiring a subscription.
Coding QuestionsAmazonMinimum Sum of Weekly Peaks
3/5Faced during technical rounds at Amazon, this algorithmic puzzle requires you to divide a sequential dataset into a fixed number of consecutive segments while minimizing the aggregate of their peak values. It tests advanced optimization techniques such as dynamic programming or binary search combined with greedy validation to efficiently manage resource allocation constraints. Mastering this challenge sharpens your ability to reason about optimal substructures. Unlock the complete analytical breakdown, step-by-step guidance, and fully working code solution with a subscription.
Coding QuestionsAmazonMinimize GPU Padding When Batching Documents
3/5A coding question on grouping variable-length documents into a fixed number of GPU batches so that as little padding as possible is wasted. It tests modelling a cost precisely, arguing which groupings need to be considered, and meeting a size bound.
Coding QuestionsAmazonCount Subsequences Greater Than a String
4/5String manipulation and combinatorial counting form the core of this challenging problem, which has been featured in technical assessments at Amazon. The task requires developers to analyze textual data and efficiently compute how many unique subsequences surpass a given reference string in alphabetical order, keeping track of modulo arithmetic for large outputs. This scenario tests advanced dynamic programming and lexicographical comparison skills. Unlock the full problem description and comprehensive model implementation by subscribing today.
Coding QuestionsAmazonMinimum Cost Over 0/1/! Subsequence Assignments
4/5A coding question about filling in wildcard characters of a binary string so that a weighted count of ordered pairs is as small as possible. It tests careful reasoning about how each choice changes later costs.
Coding QuestionsAmazonTotal Completion Time With Dependencies
3/5Featured in Amazon coding assessments, this problem challenges you to calculate the minimum duration required to complete a set of interdependent tasks assuming unlimited concurrent execution capacity. It evaluates your mastery of directed acyclic graphs, topological sorting, and critical path analysis in parallel processing environments. Unlock the comprehensive walkthrough, complexity analysis, and complete model solution with a paid subscription.
Coding QuestionsAmazonMinimum Weighted Errors From Wildcards
3/5Discover how to optimize string configurations containing ambiguous wildcard characters to minimize specific pattern penalties, a sophisticated algorithmic challenge reported during software engineering interviews at Amazon. This puzzle tests your mastery of dynamic programming and combinatorial optimization under specific cost constraints. You will learn to evaluate state transitions and modular arithmetic to achieve the lowest possible penalty score. Gain immediate access to the full problem description and expert model solution with a subscription.
Coding QuestionsAmazonMorse Code Without Separators: Encode and List All Decodings
4/5A coding question on Morse code written without separators between letters. You encode words, group words that share the same dot-and-dash pattern, and list every sequence of dictionary words that a given Morse string could stand for.
Coding QuestionsAmazonMax First-Half Minus Second-Half After Removal
4/5This advanced coding challenge, reported from Amazon technical screens, tests your proficiency in array manipulation and optimization techniques. Candidates are tasked with selectively eliminating a specific fraction of elements from a weighted collection to maximize the arithmetic difference between the resulting segments. Solving this problem demands careful strategic planning and efficient boundary management to handle large datasets effectively. Access the full problem details and a comprehensive model solution by upgrading to a paid subscription.
Coding QuestionsAmazonMaximum Sum Choosing X Elements With Row Caps
3/5This algorithm challenge, frequently reported in technical screenings at Amazon, requires candidates to find the optimal combination of items from a two-dimensional grid under strict row-wise selection limits. The task evaluates your ability to leverage advanced strategies like priority queues or dynamic programming to maximize cumulative values efficiently while handling feasibility constraints. Access to the comprehensive breakdown and verified optimal solution requires an active subscription.
Coding QuestionsAmazonLongest Consistent Feature Subsequence
3/5Evaluating relational consistency between parallel datasets is an advanced algorithmic challenge frequently featured in technical evaluations, like this reported Amazon interview question. The goal is to find the largest index subset where relative element orderings and exact ties mirror each other across two distinct sequences. This problem tests your comprehension of sorting properties, coordinate compression, and efficient subsequence identification techniques. Mastering this concept enhances your ability to handle complex mapping and correlation queries in large datasets. Access to the full problem text and complete model solution requires a subscription.
Coding QuestionsAmazonMinimize Sum of Prefix Ranges by Reordering
4/5This advanced algorithmic puzzle from Amazon challenges candidates to find the optimal arrangement of elements to minimize cumulative prefix variations. The core objective is to strategically order a collection of items to control the growth of differences between maximum and minimum values across prefixes. It tests advanced sorting heuristics and optimization strategies. The comprehensive problem description and verified solution require a subscription to access.
Coding QuestionsAmazonMinimum Insertions to Make a Subsequence
3/5This popular coding challenge frequently appears in Amazon technical screenings and evaluates your ability to manipulate sequences efficiently. You will explore how to calculate the fewest additions necessary so that a specific target collection becomes contained within another collection as an ordered sequence. This exercise tests your grasp of dynamic programming paradigms and sequential matching strategies. To master the optimal approach, including time complexity analysis and full code implementations, access the complete problem walkthrough through our premium subscription.
Coding QuestionsAmazonHouse 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 QuestionsAmazonStock Trading Profit Calculator
3/5A coding question about computing the best possible trading profit from a series of daily prices. The learner handles two modes behind one function: a single buy and sell, and repeated trades where every sale costs a fee.
Coding QuestionsAmazonMax Protected Population After One-Step-Left Relocation
4/5Featured in rigorous interview loops at Amazon, this advanced optimization problem challenges you to strategically shift protective assets leftward across a linear population array to maximize the aggregate resident count residing within secure zones. The task examines your aptitude for greedy decision-making, array manipulation, and range-based evaluation under conditional movement constraints. Explore the complete problem breakdown and the detailed step-by-step solution with a subscription.
Coding QuestionsAmazonRegular 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 QuestionsAmazonConcatenated 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 QuestionsAmazonMax Revenue With No k Consecutive Same Operations
4/5Take on this sophisticated dynamic programming challenge reported from coding evaluations at Amazon, where you must maximize cumulative financial returns from a prioritized sequence of tasks. While preserving the original relative order, you are permitted to omit certain operations, subject to a strict upper bound on how many consecutive identical task types can be executed in a row. The exercise tests your ability to balance sequential constraints with profit maximization strategies. Access the complete problem statement and optimized code walkthrough with a subscription.
Coding QuestionsAmazonMaximize Weighted Inversion Errors With Wildcards
4/5This advanced algorithmic challenge reported at Amazon evaluates your capability to optimize sequence arrangements containing ambiguous characters. The objective involves strategically resolving wildcard elements to maximize a computed score based on specific inversions within the final binary arrangement. This tests your mastery of dynamic programming, greedy strategies, and efficient combinatorial counting under constraints. Discover the complete problem breakdown and efficient model solution by upgrading to a paid subscription.
Coding QuestionsAmazonCount Perfect Stamp Packagings
3/5This intriguing Amazon interview problem challenges candidates to count how many valid label sequences can be formed by matching numerical values with specific relational constraints between adjacent items. The task tests your ability to handle combinatorics and modular arithmetic efficiently under strict conditional rules. Discovering the optimal counting strategy requires careful dynamic programming or recurrence relation analysis. To explore the complete problem description and review the fully written model solution, a paid subscription is required.
Coding QuestionsAmazonMinimum Cost to Reach Target Server Power
4/5This optimization problem, featured in Amazon technical interviews, requires candidates to select an optimal subset of computational resources to meet a specific capacity threshold while minimizing associated costs. Given variable power outputs and weighted pricing tiers for each machine, developers must find the most economical combination or determine if the target is unreachable. The challenge assesses dynamic programming and greedy decision-making skills. Unlock the complete problem statement and verified solution with a subscription.
Coding QuestionsAmazonAdd and Search Word With Wildcards
4/5In this coding task reported during an Amazon interview, you are asked to implement a versatile text search structure supporting custom wildcard matching. The core challenge tests your algorithmic efficiency in handling arbitrary character placeholders alongside sequential search queries within a robust dictionary framework. Mastering this structure requires advanced tree or traversal techniques. Unlock the comprehensive problem description and optimal solution code with a membership subscription.
Coding QuestionsAmazonMinimum Inefficiency After Filling Wildcards
3/5In this Amazon assessment task, engineers are challenged to optimize string configurations containing placeholder characters to achieve maximum structural consistency. The objective is to replace ambiguous markers with binary choices in a way that minimizes adjacent character discrepancies across the sequence. This puzzle tests algorithmic thinking, pattern recognition, and dynamic programming or greedy optimization strategies to efficiently compute the optimal configuration cost. Unlocking the full problem description, edge-case analysis, and complete model solution requires an active subscription.
Coding QuestionsAmazonMaximum Sum of Non-Overlapping Intervals
4/5Reported as an Amazon interview challenge, this problem tasks you with selecting a non-overlapping subset of scheduled activities, each carrying a specific weight, to achieve the highest aggregate profit. It tests advanced dynamic programming and interval scheduling concepts to handle overlapping timelines efficiently. The complete problem description, complexity analysis, and verified model solution require a subscription.
Coding QuestionsAmazonMinimum Conflicts Merging Two Commit Branches
4/5This Amazon interview question explores merging two distinct commit sequences, represented as strings, into a single combined sequence. The challenge lies in preserving the internal relative order of commits from each original branch while minimizing "conflicts." A conflict is defined as an inversion in the merged sequence, where a commit with a lower priority appears before one with a higher priority. Your task is to determine the optimal interleaving of the two sequences that results in the fewest possible conflicts. This problem tests dynamic programming and sequence manipulation. The full problem statement and a model solution are available with a subscription.
Coding QuestionsAmazonMaximum Profit Within a Budget
3/5Solve a variation of the classic knapsack optimization problem frequently asked in Amazon coding rounds, where you must select a subset of stocks within a given budget to maximize projected financial returns. This challenge tests your dynamic programming skills and your ability to optimize resource allocation under strict financial constraints. Mastering this technique will sharpen your problem-solving toolkit for interview success. Unlocking the complete problem walkthrough, complexity analysis, and verified model solution requires a paid subscription.
Coding QuestionsAmazonMinimum Total Distance to Two Warehouses
3/5Determining optimal facility locations to minimize travel overhead is a classic optimization challenge frequently asked during Amazon coding evaluations. Given a set of distribution points along a linear route, the goal is to strategically place two service hubs such that the aggregate distance from every point to its closest facility is minimized. This problem tests your mathematical reasoning, range partitioning strategies, and dynamic programming or greedy optimization skills. The full problem statement, detailed constraints, and complete model solution require a paid subscription to access.
Coding QuestionsAmazonWord Break — All Sentences
3/5This classic text-processing challenge, commonly asked in interviews at Amazon, requires you to segment a continuous character string into valid dictionary words, generating every possible sentence combination. You must efficiently explore multiple valid partitions without falling into exponential time traps. The task tests your proficiency with dynamic programming, backtracking recursion, and string manipulation techniques. To explore the complete problem text and review the optimal implementation code, a paid subscription is required.
Coding QuestionsAmazon
Dynamic Programming questions at Google
Divide Tree Nodes
3/5Split the nodes of a tree into as few groups as possible with no two neighbours sharing a group, then reason about the pair values inside those groups. Asked at Google, the first half has a clean answer because a tree is two-colourable, so two groups always suffice unless the tree is a single node. You will prove the colouring bound, then handle the value-based objective the follow-up adds on top. Subscribers get the complete problem and the model solution.
Coding QuestionsGoogleCount Four-Digit Codes with Sum S
3/5Count the four-digit codes whose digits add up to a given total, including codes with leading zeros. Asked at Google, this has three good answers worth comparing: nested loops over three digits, a counting recurrence over digit positions, and inclusion-exclusion on the stars-and-bars formula. You will handle totals at both extremes, avoid double counting, and explain why leading zeros are part of the count here. Subscribers can read the full problem and the model solution.
Coding QuestionsGoogleRelative Sort (Google Singapore)
3/5Count the fewest position-wise exchanges between two arrays that leave both of them strictly increasing. Asked at Google, this is a dynamic-programming walk along the positions where each step remembers only whether the previous position was swapped. You will test both options against both predecessors, detect the arrangements that cannot be fixed at all, and keep the state to two numbers. Subscribers get the full problem and the model solution.
Coding QuestionsGoogleCoins Collected Before the First Wall
1/5A coding warm-up about a token walking along a row of cells. The learner returns how many coins it picks up before its path is blocked, handling an empty row and a blocked first cell.
Coding QuestionsGoogleCount Square Submatrices with All Ones
3/5As a classic algorithmic puzzle often asked by Google, this task asks you to quantify all possible square subgrids entirely filled with ones within a binary matrix. You will need to account for overlapping regions of varying dimensions efficiently without resorting to brute-force enumeration. The challenge provides excellent practice for dynamic programming and matrix manipulation techniques. Unlock the comprehensive walkthrough and verified code implementation with a subscription.
Coding QuestionsGoogleMaximum Contiguous Subarray Sum
3/5A coding question on scanning a list of positive and negative integers to find the run of adjacent values with the largest total. The learner returns that total and the run's start and end positions, following a stated rule for ties.
Coding QuestionsGoogleMaximum Profit Along Forward Jumps
3/5A coding question on walking along a sequence where each position lets you collect a reward and leap forward by a position-specific distance, or move on one step. The goal is the largest total reward, with negative rewards, jumps past the end and long inputs to handle.
Coding QuestionsGoogleMorse Code Decoding — Count All Decodings
3/5A coding question on counting the ways a run-together string of dots and dashes can be split into letters from a given code table. The learner handles the empty string, impossible inputs and very large counts exactly.
Coding QuestionsGoogleMaximum Subarray Endpoint Score
3/5A coding question on scoring contiguous ranges of an integer list by rewarding the two end values and penalizing the values between them. It asks for the best achievable score, its location with a defined tie rule, and a strict linear-time, constant-space budget.
Coding QuestionsGoogleFence 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 QuestionsGoogleMax Coins Collected by Jumping Over Tokens
4/5Encountered in Google interview processes, this algorithmic puzzle asks you to navigate an array with variable jump lengths to maximize your accumulated score, which includes both rewards and penalties. It tests your dynamic programming skills, pathfinding logic, and optimization strategies over sequential choices. Unlock the complete problem details and clean model solution by subscribing.
Coding QuestionsGoogleMax Subset of Two-Digit Numbers With No Shared Digit
3/5A coding question about choosing the largest group of two-digit numbers from a list so that no digit is used by two chosen numbers. The learner returns only the size of that group and must handle repeated digits, duplicate values and long lists.
Coding QuestionsGoogleLongest Increasing Subarray After Changing One Element
3/5A coding question on arrays and contiguous runs. You may rewrite a single element to any integer, and you must report how long the longest strictly rising stretch can become. Careful reasoning about gaps between neighbouring values and edge positions is required.
Coding QuestionsGoogleCount 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 QuestionsGoogleSum of Distances to All Nodes in a Tree
4/5Given an undirected tree, compute for every node the sum of its distances to all other nodes. The problem tests tree traversal, careful reuse of results between neighbouring nodes and handling large trees without deep recursion.
Coding QuestionsGoogleLongest Nesting Chain of Rectangles
4/5A coding question about stacking two-dimensional boxes: given many width and height pairs, find the largest number that can be placed one inside the next. The inputs are large enough that checking every pair of boxes is too slow.
Coding QuestionsGoogle
Dynamic Programming questions at Snowflake
String Patterns
3/5Count the words of a given length over the English alphabet that never contain too many vowels in a row. This Snowflake internship question is a counting recurrence where the state is how many vowels the word currently ends with, and the alphabet splits into five vowels and twenty-one consonants. You will set up the transitions, keep the totals reduced under the required modulus, and sanity-check the small cases by hand. Subscribers can read the full problem and the derivation.
Coding QuestionsSnowflakeTree 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 QuestionsSnowflakeSelecting Stocks
3/5Choose at most one share of each company within a fixed budget to maximise the predicted year-end gain. This Snowflake question is a zero-one knapsack with a profit that can be negative, and the detail that catches people is sweeping the budget in the right direction so each item is used once. You will define the state over remaining funds, skip items that cannot improve the result, and handle a budget too small for anything. A subscription unlocks the complete problem and the model solution.
Coding QuestionsSnowflakeString Patterns (Also for Core/Database Intern :)
3/5Count the distinct words of a fixed length that never run more vowels together than an allowed limit. Reported by a Snowflake intern candidate, this is a counting recurrence where the state is the current trailing vowel run, with five vowels and twenty-one consonants driving the two transitions. You will reduce every intermediate total under the required modulus, verify the smallest cases by hand, and keep the table to a single row. Subscribers can read the full problem and the derivation.
Coding QuestionsSnowflakeLongest Subsequence With Limited Value Changes
3/5A coding question about choosing elements from an array, in their original order, so that the result switches between different values only a limited number of times, and returning the longest possible choice.
Coding QuestionsSnowflakeMaximum Profit in Job Scheduling
4/5Reported as a technical challenge at Snowflake, this optimization problem asks you to select a schedule of non-overlapping assignments to achieve maximum financial return. The question evaluates your mastery of dynamic programming combined with efficient searching techniques, such as binary search on sorted intervals. You must carefully weigh overlapping timeframes to determine the most lucrative combination of tasks. Unlock the comprehensive problem description and optimal model solution with a subscription.
Coding QuestionsSnowflakeDistance to the Nearest Zero in a Binary Grid
3/5A coding question on grids of zeros and ones: for every cell, report how far it is from the closest zero when moving only up, down, left or right. It checks that the result has the same shape as the input and is right for every cell.
Coding QuestionsSnowflakeTwo Encoded Strings Describe the Same Original
4/5A string question on compressed text: letters stand for themselves and numbers stand for runs of unknown characters, with digit runs that can be read in several ways. The learner must decide whether two compressed strings could describe one original string.
Coding QuestionsSnowflakeCheapest Flights Within K Stops
3/5Featured in Snowflake technical interviews, this graph traversal challenge asks you to find the most cost-effective travel route between two locations while strictly capping the number of intermediate connections. It tests your proficiency with weighted pathfinding algorithms, dynamic programming, and managing state constraints within network topologies. Access the comprehensive breakdown, time complexity analysis, and fully working reference solution by subscribing today.
Coding QuestionsSnowflakeMax Credits with K Non-Overlapping Classes
4/5A coding question about building a class timetable: choose classes that do not clash, up to a fixed number of them, so that the earned credit is as high as possible. It checks exact rules for back-to-back classes, a zero limit and large inputs.
Coding QuestionsSnowflakeMinimum Coins to Pay With Change
3/5A coding question about paying an exact amount with a fixed set of coin values when overpaying and receiving change is allowed. The goal is the smallest number of coins that change hands in total, counting both the payment and the change.
Coding QuestionsSnowflake
Dynamic Programming questions at Uber
Longest Diagonal Pattern
3/5Find the longest run along a matrix diagonal that starts at one marker value and then alternates between two others without turning. This Uber question has four diagonal directions to consider and a strict alternation rule, which makes a per-cell dynamic-programming state the natural answer. You will define what the state remembers, scan in an order that has the predecessor already computed, and handle single-cell runs. A subscription unlocks the full problem and the model solution.
Coding QuestionsUberNumber 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 QuestionsUberMinimum Edge Reversals from Every Root
4/5A coding question on a directed tree with up to 100,000 nodes: pick the start node needing the fewest flipped edges so all nodes become reachable from it.
Coding QuestionsUberSplit a String into Dictionary Words
3/5A coding question on deciding whether a string can be fully split into words from a given vocabulary, with words reusable. It tests careful handling of reuse and empty input, and meeting time limits on long strings that have no valid split.
Coding QuestionsUberNumber of Ways to Wear Different Hats to Each Other
4/5A counting question about handing out distinct items to people who each accept only some of them. It tests how to keep the amount of state small when one side of the matching is much larger than the other.
Coding QuestionsUberMaximum Score Path with Prime Jumps Ending in 3
3/5A dynamic programming question on an integer array with negative values, where a path may take single steps or jumps whose length is a prime ending in a given digit. The task is to choose the path to the last index with the largest collected total.
Coding QuestionsUber
Dynamic Programming questions at Meta
Card Game: Clear Triples Summing to 15
3/5A coding question about a solitaire card game in which three cards with a fixed total are cleared each round. It tests finding a valid group of cards under a precise ordering rule, then reasoning about which choice each round leads to the highest final score, and judging a strategy by simulation.
Coding QuestionsMetaMaximum Path Sum in a Grid
3/5Reported as a common Meta interview challenge, this matrix navigation task requires finding an optimal trajectory from the upper-left corner of a numeric grid to the bottom-right destination. Because movement is restricted to specific directions and cells may contain negative integers, candidates must carefully compute cumulative weights to maximize the final tally. This exercise evaluates proficiency in dynamic programming and grid-based traversal strategies. Unlock the comprehensive problem statement, thorough algorithmic analysis, and clean production-ready code with our subscription.
Coding QuestionsMetaPlan Round Trip With Minimum Flight Cost
3/5Examine this Meta-reported interview question that tasks you with scheduling a journey by picking an optimal departure and return timeframe to minimize overall expenses under strict sequential conditions. This problem evaluates your ability to leverage prefix or suffix tracking techniques to evaluate paired options efficiently without resorting to brute-force nested iterations. You will discover how to handle custom tie-breaking rules while optimizing costs. Unlocking the thorough problem analysis and verified code solution requires a paid subscription.
Coding QuestionsMetaMaximum Reward Path Through a Grid
3/5A coding question about a robot crossing a grid of positive and negative rewards, moving only right or down, to collect as much as possible. It checks careful handling of edges, single rows and columns, and grids where every reward is negative.
Coding QuestionsMetaCount Shortest Paths in a Binary Grid
4/5This Meta interview problem challenges you to navigate a matrix containing open paths and barriers to find all minimal distance routes between two corners. It tests your mastery of graph traversal algorithms, dynamic programming, and combinatorial counting techniques under modular arithmetic constraints. You must carefully handle unreachable destinations and overlapping potential routes. To explore the full problem statement and study the optimal algorithmic solution, a paid subscription is required.
Coding QuestionsMetaMaximum Profit from Stock Prices
3/5A coding question about stock trading on a list of daily prices: return the best profit from a single purchase and later sale, then extend it to as many trades as you like while holding at most one share.
Coding QuestionsMeta
Dynamic Programming questions at Rubrik
Battle with Upper Moon 6
4/5Confront an intricate grid simulation puzzle featured in coding assessments at Rubrik, where you manage the cascading revival states of defeated entities across a matrix. Each cell updates based on precise chronological rules and hierarchical dependencies, requiring sophisticated tracking of dependent subtrees and state transitions over multiple turns. This rigorous challenge evaluates your advanced graph traversal strategies, multidimensional array manipulation, and algorithmic efficiency under complex business rules. The full problem and model solution require a subscription.
Coding QuestionsRubrikStarlight
3/5This Rubrik coding question, named "Starlight," presents an array of integer values representing luminosities. The "beauty" of this array is defined as the largest possible sum of any continuous sub-segment. You are provided with a special amplifier, characterized by a multiplier z, which can be applied to a single contiguous portion of the array. The goal is to strategically apply this amplification at most once to maximize the overall beauty of the array. This problem challenges your dynamic programming or array manipulation skills. The full problem statement and a model solution are available with a subscription.
Coding QuestionsRubrikSave the Universe
4/5This advanced tree-partitioning challenge, featured in Rubrik technical interviews, evaluates your ability to decompose hierarchical structures into linear segments under strict size and weight constraints. Candidates must carefully analyze nodes and paths to optimize grouping efficiently while adhering to cumulative thresholds. Tackling this problem requires sophisticated dynamic programming or greedy strategies combined with tree traversal techniques. Discovering the complete problem statement and reviewing the expert model solution require a subscription.
Coding QuestionsRubrikBitonic Partitioning
4/5This challenging Rubrik interview question explores advanced array segmentation, requiring engineers to count valid contiguous partitions that follow a specific rise-and-fall pattern of subgroup averages. The core difficulty lies in efficiently evaluating numerous combination possibilities while adhering to strict structural constraints on the resulting sequence of statistical means. Crafting an optimal solution demands clever pre-computation and dynamic programming techniques to manage sub-array calculations swiftly. Unlock the complete problem statement, mathematical breakdown, and fully coded model solution with a paid subscription.
Coding QuestionsRubrikWord Compression
3/5This reported interview question from Rubrik challenges candidates to find the overlap between two text sequences while accounting for both contiguous matching and broader sequential relationships. It tests your ability to manipulate strings efficiently and handle edge cases where one text sequence entirely encompasses another in a specific structural way. Developing an optimal algorithm requires careful comparison logic to handle various sequence lengths. Access to the full problem description and model solution requires a subscription.
Coding QuestionsRubrik
Dynamic Programming questions at Databricks
Non-Adjacent Heist: Line, Circle, Tree, and Gap Variants
3/5A coding question on choosing non-conflicting values to maximise a total. The base task is on a line, and the variants change the layout to a ring or a tree and change how far a chosen item's restriction reaches.
Coding QuestionsDatabricksMaximal Square and Maximal Rectangle in Binary Matrix
4/5A coding question on finding the largest block of ones in a binary grid, first as a square and then as a general rectangle. It tests grid reasoning and efficient scanning of large inputs.
Coding 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 QuestionsDatabricksFile System Encryption Count and Minimum-Cost Encryption
2/5A coding question on a tree of files and folders: first tally the files by state, then choose the cheapest mix of per-file and per-folder operations that leaves every file in the desired state. It covers tree traversal and cost trade-offs on nested structures.
Coding QuestionsDatabricks
Dynamic Programming questions at Agoda
Minimum Path Sum in Triangle
3/5A question about a triangular arrangement of numbers: choose a route from the apex to the base that moves only to neighboring entries and has the lowest total, even when some entries are negative.
Coding QuestionsAgodaTwo-Core Process Assignment
3/5In this engaging coding exercise reported during Agoda interviews, you must divide a collection of workload durations between two processing units so that the highest combined load is kept as small as possible. This problem examines your grasp of dynamic programming and balancing subsets. The complete problem statement and verified solution are available to subscribers.
Coding QuestionsAgodaMaximize Sum of Processed Times
4/5This advanced scheduling puzzle involves distributing a sequence of tasks across dual computing units governed by a dynamic priority mechanism, highlighted in Agoda interviews. You must determine the optimal assignment strategy to maximize overall throughput or processing metrics while tracking state transitions between processors. The challenge evaluates your dynamic programming or greedy algorithm design capabilities under complex operational rules. View the full problem description and reference solution by obtaining a subscription.
Coding QuestionsAgoda
More Dynamic Programming questions
Pascal's Triangle
2/5Featured as a technical interview task at Ericsson, this coding problem challenges you to construct the classic mathematical arrangement known as Pascal's Triangle up to a given row limit. You will need to apply iterative logic to properly calculate and format the inner values while ensuring boundary conditions are correctly handled for every generated row. This exercise assesses your fundamental array manipulation abilities and algorithmic thinking. Unlock the full problem statement and a robust model solution with a subscription.
Coding QuestionsEricssonBinomial Tree Risk Neutral Pricing
3/5Master quantitative finance fundamentals by exploring how to value derivatives using discrete asset price movements. This exercise, frequently featured in technical assessments at SMBC, requires building a recombining lattice framework to simulate future market paths under risk-neutral probabilities for both European and American style contracts. Candidates are tested on their ability to translate financial mathematics into efficient algorithms while handling discounting and boundary conditions correctly. Access to the comprehensive problem description, edge cases, and complete model implementation requires a paid subscription.
Coding QuestionsSMBCMinimize Cost to Make Adjacent Blocks Unequal
4/5This interview problem from WeRide requires determining the smallest financial investment needed to modify structural elevations so that no two neighboring elements share the same value, utilizing only upward adjustments. Candidates must strategically choose which items to raise and by how much to optimize the total expense efficiently. The complete problem description, strategic breakdown, and verified code solution require a subscription.
Coding QuestionsWeRideDomino 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 QuestionsJPMorganLongest 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 QuestionsSalesforceArray Break
4/5Featured in D. E. Shaw assessments, this coding problem requires you to split a numeric sequence into two parallel component arrays satisfying strict sorting constraints and split-sum equations. It evaluates your ability to combine dynamic programming or combinatorial counting with modulo arithmetic for large numerical outcomes. Unlocking the complete problem statement, comprehensive test cases, and the expert model solution requires a subscription.
Coding QuestionsD. E. ShawMinimum Cost to Send People to Two Cities (Generalized to K)
3/5Send a group of people to two destinations at minimum total cost while filling each destination exactly half full. This Bloomberg question has a neat greedy answer driven by the cost difference per person, and then a follow-up that generalises to several destinations and breaks the greedy argument. You will sort by the difference, assign the clear cases first, and explain why the many-destination version needs a different technique. The full problem and the model solution require a subscription.
Coding QuestionsBloombergMin Num Letters
2/5Find the fewest letters to delete from a word so that what remains is in alphabetical order. This Microsoft question is the longest-non-decreasing-subsequence problem turned inside out: the answer is the word length minus that subsequence's length. You will choose between the quadratic table and the patience-sorting approach with binary search, and handle repeated letters without accidentally requiring strict increase. The complete problem and the reference solution are available to subscribers.
Coding QuestionsMicrosoftStock 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 QuestionsOptiverCount Unordered Ways to Reach a Total Weight Using Parts 1 to k
3/5A coding question on counting how many distinct collections of small weights add up to a target, where reordering the same weights does not create a new answer. Results grow very quickly, so the count is reported modulo a large prime, and the main trap is counting one collection more than once.
Coding QuestionsConfluentFuture Stock Prices Maximum Profit
4/5Explore this challenging algorithmic puzzle reported from Hudson River Trading interviews, centered around maximizing investment growth given a series of future market valuations. The problem tests your strategic financial calculation skills by allowing fractional share trading and flexible cash holding without short selling or transaction fees. It evaluates how effectively you can model financial decisions and optimize capital returns over a timeline of fluctuating prices. Subscribe today to access the full problem details and the complete expert solution.
Coding QuestionsHudson River TradingCoin Change (Minimum Coins)
3/5This classic dynamic programming problem, featured in Adobe coding interviews, challenges you to determine the fewest number of monetary units needed to reach a specific target sum given an unlimited supply of various denomination values. It tests your capability to break down optimization problems into overlapping subproblems and build efficient bottom-up or memoized solutions. The complete problem description, test cases, and optimal model solution require a subscription.
Coding QuestionsAdobeMinimum Path Sum
3/5Optimizing traversal routes across a matrix is a classic dynamic programming challenge often featured in coding evaluations for software engineering roles at Datadog. This problem tests your ability to compute the most cost-effective journey through a grid of numerical values while adhering to strict movement restrictions. You will need to apply efficient state-transition strategies to systematically determine the optimal accumulated weight from start to finish. Unlock the complete problem statement and verified model solution with a subscription.
Coding QuestionsDatadogMaximize Beautiful Substrings
4/5Presented during Fortinet technical evaluations, this string manipulation challenge invites you to fill in missing characters within a patterned text to maximize the creation of uniform contiguous segments. You must strategize how wildcard positions are resolved to achieve the highest possible density of identical adjacent characters. This puzzle examines advanced string processing, combinatorial thinking, and dynamic programming concepts. Unlock the complete problem breakdown and model solution by subscribing today.
Coding QuestionsFortinetString 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 QuestionsMathWorksBest Time to Buy and Sell Stock (One and Two Transactions)
3/5This classic financial optimization puzzle, frequently asked in Visa interviews, asks you to determine the maximum financial gain achievable from stock price histories under strict transaction limits. You will explore scenarios allowing a single trade as well as an extended version permitting up to two non-overlapping transactions. The exercise tests your capability to optimize dynamic tracking variables and apply greedy strategies over sequential time-series data. To unlock the full problem details and expert-crafted model solution, a subscription is required.
Coding QuestionsVisaLongest Vowel Subsequence in Order
3/5Sourced from a UiPath technical interview, this string-processing challenge asks you to find the longest valid subsequence containing all five lowercase vowels in strict alphabetical order. You must iterate through the given text while ensuring that no vowel appears out of sequence, maintaining the required progression from the first vowel to the last. This problem evaluates your dynamic programming acumen, state tracking abilities, and string parsing efficiency. The complete problem statement, edge cases, and model solution are available exclusively with a paid subscription.
Coding QuestionsUiPathProbability of a Dice Roll Sum
3/5This Belvedere Trading interview question challenges you to compute the likelihood of obtaining a specific aggregate outcome when throwing standard multi-sided dice multiple times. It evaluates your grasp of probability theory, combinatorics, and dynamic programming approaches for counting valid outcomes. To view the full problem statement and expert model solution, a subscription is required.
Coding QuestionsBelvedere TradingBest Time to Buy and Sell Stock with Chunk Summaries
3/5Highlighted in technical assessments at Zoox, this financial tracking task challenges you to maximize profit from a single stock acquisition and liquidation cycle given historical valuation data. The advanced follow-up extends the premise to handle massive datasets split into chronological segments, requiring you to design an efficient aggregation strategy that computes global gains solely from localized summary metrics. It tests both your foundational algorithmic thinking and data reduction skills. Gain full access to the complete problem text and reference implementation by subscribing.
Coding QuestionsZooxMadam C.J. Walker's Business Plan
3/5Inspired by historical entrepreneur Madam C.J. Walker, this Fortinet-reported challenge presents a fascinating twist on the classic knapsack optimization problem. You are tasked with maximizing revenue by selecting from various retail items with exponential profit margins, constrained by a strict investment limit and large number arithmetic. This exercise tests your dynamic programming proficiency and ability to manage modular arithmetic under tight constraints. Access the complete problem description and comprehensive solution by subscribing today.
Coding QuestionsFortinetCount Good Strings
3/5This Commvault interview question involves combinatorial counting and sequence validation under strict structural constraints. You must determine the total number of valid configurations of two distinct characters where prefixes maintain a specific balance condition, mirroring properties of well-formed parentheses or Dyck paths. The challenge evaluates advanced dynamic programming, combinatorics, and modular arithmetic skills. The complete problem details, mathematical derivation, and optimized code solution require a subscription.
Coding QuestionsCommvaultSegment a String into Vocabulary Words
3/5A coding question about deciding whether a lowercase string can be cut entirely into pieces that each appear in a supplied word list, with words allowed to repeat.
Coding QuestionsCompassComplex Algorithmic Challenge
3/5Count the non-empty subsets of an array whose elements add up to an even total, faster than enumerating every subset. This Bloomberg question turns on parity alone: only the count of odd values matters, because the even values can be included freely and the odd ones must be taken in pairs. You will derive the closed form from that observation, handle an array with no odd values, and avoid the exponential enumeration the statement rules out. A subscription unlocks the full problem and the derivation.
Coding QuestionsBloombergTwo Robots, Two Delivery Blocks: Maximum Total Payment
3/5A coding question about selecting two separate stretches of fixed length from a row of non-negative numbers so their combined total is largest. It rewards care with the left-to-right order of the two stretches, choices that crowd each other out, and inputs with no valid choice, then asks how the idea extends to more stretches.
Coding QuestionsNuroFewest Square Numbers Summing to n
3/5A coding question on writing a positive integer as a sum of perfect squares. The learner must find a decomposition with the fewest possible terms and return the actual squares, not just their count, for inputs up to ten thousand.
Coding QuestionsPinduoduoBinary 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 QuestionsAdobeMaximum Non-Adjacent Sum on a Circular Street
3/5A coding question about choosing houses on a closed loop of streets so that no two chosen houses are next to each other, to collect the largest possible total. It checks that the wrap-around between the first and last house is handled correctly.
Coding QuestionsNIOTower of Hanoi (recursion)
3/5Report the fewest moves needed to shift a stack of graded disks onto another peg without ever resting a larger disk on a smaller one. This Apple question has a closed-form answer and a recursive derivation, and the interviewer usually wants both. You will state the recurrence, reduce it to a formula, and note where the result stops fitting in a machine integer as the disk count grows. Subscribers can read the complete problem and the full derivation.
Coding QuestionsAppleLexicographically Smallest String With Minimum Replacements
4/5This ServiceNow interview puzzle challenges you to transform a given sequence of characters into a non-decreasing order while performing the fewest possible substitutions, selecting the lexicographically smallest result among ties. It tests your advanced string manipulation abilities, greedy decision-making, and dynamic programming insight to handle complex transformation constraints efficiently. Crafting an optimal strategy requires balancing multiple conditions to achieve the lowest possible lexicographical profile. To view the complete problem details and the expert model solution, a subscription is required.
Coding QuestionsServiceNowTrading Profit With One, Many or k Trades
4/5A coding question in three stages about the largest profit from buying and selling one stock given its daily prices: with one trade, with any number of trades, and with at most k trades. The learner must return the best total for each limit.
Coding QuestionsCitadelTwo-ball Drop Problem
3/5This classic interview puzzle, featured by Talroo, challenges you to find the most efficient strategy for testing durability limits using a limited number of identical testing objects. The scenario evaluates your logical reasoning, worst-case optimization mindset, and mathematical problem-solving skills rather than heavy programming. To view the complete analytical breakdown and the mathematically sound model solution, a paid subscription is required.
Coding QuestionsTalrooColor Fence Posts So Neighbours Differ
2/5A coding question about counting the ways to color a row of posts when neighbouring posts must not share a color. The learner returns the exact count for up to a thousand posts and colors.
Coding QuestionsRippleCount Distinct Movement Subsequences on a Number Line
4/5This advanced algorithmic problem, frequently encountered in Visa technical screenings, explores counting valid directional sequences on a bounded integer track. Candidates must compute how many unique movement combinations successfully navigate from an origin to a destination without crossing boundary limits. The task thoroughly evaluates combinatorial logic, string processing, and dynamic programming or backtracking optimization. Unlocking the complete problem specification and its rigorous model solution requires an active subscription.
Coding QuestionsVisaWaste Reduction — Minimize Number of Groups
3/5This IMC Trading interview question tasks you with partitioning a collection of elements into the fewest possible containers without exceeding a specific capacity limit. The problem examines your algorithmic problem-solving skills, particularly your ability to tackle bin-packing optimization challenges using greedy strategies or dynamic programming. You must efficiently organize the items to minimize overall waste. Unlock the full problem details and optimized solution with an active subscription.
Coding QuestionsIMC TradingBest Bending Path Sum in a Binary Tree
4/5A coding question on binary trees whose node values may be negative: find the largest total along any chain of connected nodes, then return the values on one such chain in order. Trees can be large and deeply unbalanced.
Coding QuestionsByteDanceLongest String Without AAA or BBB
3/5This Zalando interview question tasks you with constructing the longest possible text sequence using specific building blocks while strictly avoiding consecutive repetition limits. You must strategically interleave available segments to maximize length without triggering forbidden substring conditions. The challenge evaluates your greedy algorithm design and state management capabilities under tight constraints. Unlock the comprehensive walkthrough and optimal code solution with a subscription.
Coding QuestionsZalandoMax 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 QuestionsMistral AIMaximum 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 QuestionsTwo SigmaDot-and-Star Pattern Matching
4/5A coding question on writing a matcher for patterns with a single-character wildcard and a repeat symbol, where the pattern has to describe the entire string. It tests careful case analysis, empty strings and partial-match traps, all without a regular-expression library.
Coding QuestionsCitadelMinimum Insertions / Deletions Password Update
3/5A coding question about turning one password string into another when the only allowed edits are adding or removing a single character, and reporting the smallest number of such edits.
Coding QuestionsCiscoSum 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 QuestionsWells FargoMaximum-Weight Independent Set in a Graph
4/5A coding question about selecting the most valuable compatible group of vertices from a small undirected graph. It tests careful handling of conflicts, negative values, disconnected inputs, and deterministic ties.
Coding QuestionsByteDanceJump Game
3/5Navigating sequential arrays with variable advancement limits is a popular interview staple, featured as a reported Visa interview question. Participants must determine whether it is feasible to traverse from the initial index to the very end of a sequence given dynamic step allowances at each milestone. This problem is designed to test your mastery of greedy trajectory tracking and forward-looking state management. Get full access to the complete problem instructions and an optimized model solution with a paid subscription.
Coding QuestionsVisaMaximize Profit with Stock Transactions
2/5A coding question about stock prices over a series of days. You decide when a single purchase and a later sale would have earned the most, or report that no profit is possible.
Coding QuestionsZillowPattern Matching with Question Mark and Dot Wildcards
3/5This eBay coding challenge asks you to implement a string matching algorithm. You are given a collection of words and a pattern that includes special characters: one for any single character and another for one or more arbitrary characters. The task is to identify all words from the provided list that completely conform to the given pattern. This problem assesses your ability to handle complex string comparisons and wildcard logic efficiently. The full problem description and a model solution are available with a subscription.
Coding QuestionseBayMinimum Cost to Color a Row of Houses
3/5A coding question about assigning one of three options to each item in a line at minimum total price, where items that sit next to each other must receive different options.
Coding QuestionsShopifyMinimum Instructions to Reach a Target Position
4/5A coding question about a car that accelerates and reverses along a number line. You find the fewest commands that stop it exactly on a target point, which requires bounding an otherwise unbounded state space.
Coding QuestionsWaymoMaximum Cities Visited Traveling West to East with Lexicographic City Names
3/5A coding question about choosing the longest west-to-east route through a set of cities. Every stop must be strictly farther east and have a name that sorts strictly later, and the task is to report how many cities the best route covers.
Coding QuestionsUpstartInstall Carbon Filters
3/5This coding challenge, frequently reported during interviews at Deloitte, requires you to complete a sequence of home purification devices while avoiding excessive clustering of identical equipment. You will need to determine a valid placement arrangement for two distinct device categories across a row of buildings containing pre-existing units and empty slots. This exercise evaluates your combinatorial reasoning, pattern matching, and constraint satisfaction abilities. Access to the complete problem description and expert-crafted model solution requires an active subscription.
Coding QuestionsDeloitteWater Trapped Between Elevation Bars
4/5A coding question on an elevation map of bars that collects rainwater in its dips. The learner computes the total trapped volume, covering flat, rising and falling shapes.
Coding QuestionsGoldman SachsPalindromic Array Transformation
3/5This algorithmic puzzle from a PayPay interview challenges you to manipulate a collection of string elements through controlled character shifts across boundaries to achieve a symmetric array structure. The problem examines your proficiency with greedy transformations, array indexing, and state validation under strict operational rules. Explore the complete problem details, algorithmic insights, and the step-by-step model solution by securing a subscription.
Coding QuestionsPayPayMaximum Subarray Sum With Edge Cases
3/5A coding question on arrays: find the largest sum of any contiguous stretch of an integer list. It tests inputs that trip up quick answers, such as lists made only of negative values, a single element, zeros, very large numbers and an empty list, and how each case should be reported.
Coding QuestionsUpstartChain of Command — Longest Chain Length
3/5Analyze hierarchical relationships with this graph theory challenge frequently utilized by IMC Trading. The task involves examining a corporate reporting structure to compute the maximum depth of directed supervisory paths within a directed acyclic graph. This problem tests your graph traversal capabilities and your knack for identifying longest paths efficiently. To view the complete problem details and the optimal model solution, a subscription is required.
Coding QuestionsIMC TradingCount the Longest Increasing Subsequences
3/5A coding question about counting, rather than just measuring, the longest strictly increasing runs that can be picked from a list in order. It rewards careful handling of ties between equal values and of how many ways each best length can be reached.
Coding QuestionsPinduoduoMeeting Room
3/5This scheduling optimization puzzle, reported from WeWork interviews, requires candidates to maximize attendance across multiple competing groups vying for a single meeting room. Given group sizes and reservation time windows, the objective is to select a non-overlapping subset of meetings that minimizes the total number of excluded participants. The assessment tests interval scheduling algorithms and combinatorial optimization. Unlock the comprehensive problem description and model solution by subscribing.
Coding QuestionsWeWorkCount Unique Paths in a Grid
3/5Determine all possible movement routes across a matrix from the top-left corner to the bottom-right destination in this classic Okta interview task. The challenge tests your dynamic programming and combinatorics knowledge by restricting movement to specific directions only. You must construct an efficient approach that scales well with grid dimensions while avoiding redundant computations. Access to the complete problem description, constraints, and optimized model solution requires a subscription.
Coding QuestionsOktaMaximum Subarray Sum
3/5A classic algorithmic problem encountered in PayPal software engineering loops, this challenge requires identifying the contiguous segment within a numeric sequence that yields the highest cumulative sum. Candidates must devise an efficient linear-time approach using dynamic programming techniques to avoid the heavy computational cost of nested iteration. This problem thoroughly tests your ability to optimize dynamic state tracking on arrays. Access the complete problem statement and clean code solution by purchasing a subscription.
Coding QuestionsPayPalLargest Sum of a Steep Subsequence
4/5A coding question about choosing elements of an integer list, in order, under a rule that ties how much the values rise to how far apart the chosen positions are, so that the chosen elements add up to as much as possible.
Coding QuestionsServiceNowFind Max Minimum Value Using K Elements
3/5Reported as a ServiceNow interview question, this optimization task requires you to select a specific subset of indices from dual arrays to maximize a bottleneck metric. The objective is to pick elements such that the lesser of the two accumulated sums across the chosen positions reaches its highest possible value. The problem tests your optimization techniques and combinatorial search capabilities. The full problem and model solution require a subscription.
Coding QuestionsServiceNowTrapping Rain Water
4/5Featured in Apple interview loops, this classic algorithmic problem requires calculating the volume of water trapped between elevation bars after a rainfall. It tests your ability to optimize spatial tracking using two-pointer techniques or monotonic stacks to achieve linear time complexity. The complete problem walkthrough and model solution require an active subscription.
Coding QuestionsAppleIncreasing Paths in a Grid II (Large Counts)
4/5In this Hudson River Trading coding challenge, you must compute the sheer volume of strictly rising trajectories across a matrix, where totals can scale into the tens of billions. This task tests your mastery of dynamic programming combined with large integer arithmetic to handle massive combinatorial explosion. Access to the full problem breakdown and an optimal model solution requires a subscription.
Coding QuestionsHudson River TradingIncreasing Paths in a Grid
3/5Presented in Hudson River Trading interviews, this grid-based challenge requires you to compute the total count of valid movement sequences where numerical values strictly escalate across adjacent cells. The problem tests advanced traversal strategies, memoization, and combinatorial counting on a matrix. Explore the complete problem breakdown and optimized solution by purchasing a subscription.
Coding QuestionsHudson River TradingRun-Length Encoding (RLE) Encode/Decode with Max Run Length K; Minimize Encoding Length
3/5A Liftoff coding question on a run-length encoding variant where each run count has an upper limit and the encoded output must be as short as possible. It tests string parsing and recognising when a greedy choice fails and dynamic programming is needed.
Coding QuestionsLiftoffTree Points
4/5Navigating hierarchical structures while optimizing numerical outcomes is a frequent theme in advanced algorithm screenings, such as this reported D. E. Shaw interview question. Participants must evaluate a network of connected nodes, each possessing specific weights, and decide between distinct point-collection strategies that may propagate effects to neighboring vertices. The challenge evaluates your depth in tree-based dynamic programming and recursive state evaluation. The complete problem statement and verified model solution are available to subscribers.
Coding QuestionsD. E. ShawStock 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 QuestionsOptiverCampaign Cost Weekly Partition
4/5A coding question on splitting an ordered list of costs into a fixed number of consecutive groups so that the total of the group peaks is as low as possible. It tests how you define the subproblem and reason about why locally cheap splits can be globally worse. The full statement, tests and worked solution are for subscribers.
Coding QuestionsSalesforceCoin Change Problem
3/5This classic interview problem from GEICO challenges you to find the minimum number of coin units needed to form a specific target sum using an unlimited supply of given denominations. It evaluates your dynamic programming abilities, specifically your knack for breaking down optimization problems into overlapping subproblems and building efficient tabular solutions. Unlock the comprehensive explanation, complexity analysis, and working code by subscribing to our platform.
Coding QuestionsGEICOSmallest Number Greater Than K
3/5This Accenture interview challenge requires you to form the smallest possible numerical value greater than a given threshold by deleting digits from a source string while strictly preserving their relative order. You must intelligently decide which digits to drop or retain to satisfy both the ordering constraint and the strict inequality comparison against the target value. The exercise tests your string manipulation skills and greedy decision-making abilities under numeric constraints. Get complete access to the full problem text and a verified model solution with a subscription.
Coding QuestionsAccentureMaximum Sum Path in a 2D Array
3/5In this Glean interview question, candidates must navigate a two-dimensional grid from the starting corner to the finish while maximizing the accumulated numerical value along the route. Restricted to specific directional movements, developers must apply dynamic programming principles to discover the optimal path. This challenge examines matrix traversal strategies and memoization techniques. Access the complete problem statement and a verified code solution with a subscription.
Coding QuestionsGleanMaximum Non-Adjacent Chocolates
3/5Choose from a row of containers so that no two chosen ones sit side by side, collecting as many items as possible in total. The exercise checks that you can turn a neighbour restriction into a clean per-position decision. Subscribers can open the complete statement and the model solution.
Coding QuestionsCiscoGenerate Matrix B (2D Prefix Sum)
2/5This matrix transformation puzzle, commonly asked by Arista Networks, challenges developers to compute a two-dimensional prefix sum grid from a given input array. Each cell in the resulting structure must contain the cumulative sum of all preceding elements within the top-left rectangular region. Solving this efficiently demands a strong grasp of dynamic programming and matrix manipulation techniques to optimize computational overhead. Explore the full problem specifications and optimal solution by subscribing.
Coding QuestionsArista NetworksCoding Problem 1 (1D Dynamic Programming)
3/5This interview task reported at Squarepoint challenges candidates to build an efficient optimization or counting algorithm using linear sequential programming techniques. It evaluates your ability to break down complex state transitions and manage sequential computations effectively. The complete problem statement, constraints, and expert-written model solution require a subscription.
Coding QuestionsSquarepointLargest Square of Ones
3/5A coding question about a grid of zeros and ones in which you report how wide the biggest solid block of ones can be. It checks careful handling of grids with no ones, grids that are entirely ones, and large inputs.
Coding QuestionsFactSetTwo Knapsack Problem
3/5In this Tradeweb interview question, you will tackle an extension of the classic knapsack optimization problem involving two capacity-constrained containers. Your goal is to select and distribute a given set of weighted and valued items to maximize the combined value packed into both knapsacks without exceeding their limits. This exercise tests your dynamic programming skills and mastery of multi-resource optimization problems. Get full access to the complete problem definition and verified solution by subscribing.
Coding QuestionsTradewebLongest Common Subsequence
3/5This classic dynamic programming problem, featured in technical loops at Roku, requires you to find the longest sequence of characters that appear in the same relative order within two separate strings. The challenge tests your ability to break down a sequence-matching problem into overlapping subproblems and construct an optimal substructure matrix or state transition. Mastering this concept is crucial for understanding string similarity metrics and advanced algorithmic optimization techniques. To examine the full problem specification and review a well-commented model solution, a subscription is required.
Coding QuestionsRokuMaximum Sum Subarray
2/5Finding the most lucrative contiguous segment within a numeric sequence is a foundational algorithmic challenge frequently encountered in technical screenings. As asked in recent developer interviews at Glean, this problem tests your ability to scan a linear collection of integers and efficiently isolate a sublist that yields the absolute highest cumulative sum. You will need to implement an optimized linear-time approach that dynamically evaluates running totals without relying on brute-force nested iterations. Unlock the complete problem guide, complexity analysis, and clean model implementation with our paid subscription.
Coding QuestionsGleanMinimum-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 QuestionsByteDanceCount Ways to Move a Token Off a Grid
3/5A coding question on counting: find how many different move sequences take a token off a rectangular board within a move limit, reporting the result modulo a large prime.
Coding QuestionsAppleNon-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 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 QuestionsAkuna CapitalCommon Restaurant Pickup Order
3/5A coding question about two delivery routes that each visit restaurants in a set order. The candidate returns the longest list of stops that fits both routes, as the names themselves rather than a count, and handles repeated names, ties and empty routes.
Coding QuestionsDoorDashOptimal 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 QuestionsOptiverFactory 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 QuestionsStripeBest Time to Buy and Sell Stock with Cooldown
3/5Tackling financial market simulations is the focus of this algorithmic trading puzzle previously encountered in GEICO interviews. Given a chronological timeline of asset valuations, your mission is to calculate the highest achievable revenue under the restriction that selling a holding forces a mandatory waiting period before purchasing again. This dynamic programming challenge evaluates your capability to track multi-state transitions over time. The full problem description and verified programming solution require an active subscription.
Coding QuestionsGEICOMaximum 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 QuestionsTwo SigmaLayover 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 QuestionsAirbnbCount Letter Decodings of a Digit String
3/5A coding question about digit strings produced by writing letters as their alphabet positions: find the number of distinct letter sequences that encode to a given digit string, with careful handling of zeros.
Coding QuestionsGoldman SachsSki 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 QuestionsAirbnbOptimal Crop Selection for Maximum Profit
3/5This reported interview question from Block challenges candidates to solve a resource allocation puzzle involving agricultural investments. Given various produce options with distinct acquisition expenses, revenue yields, and growth durations, along with financial and temporal constraints, you must figure out the optimal strategy to maximize financial returns. This exercise tests your ability to design robust algorithms for knapsack-style optimization under tight limits. Access to the complete problem breakdown and verified solution requires a subscription.
Coding QuestionsBlockFood 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 QuestionsCoinbaseFewest Stores to Fill a Shopping List
4/5Pick the smallest set of shops that between them stock every item on a list, given thousands of shops and a list of at most sixteen items. Asked at Whatnot, the size limits are the hint: the item list fits in a machine word, which turns coverage into a search over bitmasks rather than an intractable set-cover. You will compress each shop to a mask, search over reachable coverage states, and report the impossible case honestly. The full problem and the model solution require a subscription.
Coding QuestionsWhatnotDynamic Programming (Medium) Similar to House Robber
3/5Featured in technical assessments at Expedia, this classic algorithmic problem tests your proficiency with linear optimization and state tracking. Given a sequential collection of values, you must compute the optimal subset accumulation under the constraint that no two adjacent elements can be selected simultaneously. The scenario challenges you to recognize overlapping subproblems and construct an efficient linear-time recurrence relation. To view the full problem breakdown, constraints, and verified model solution, a subscription is required.
Coding QuestionsExpediaMaximum Value of an Expression Read Along a Grid Path
3/5A coding question on a grid of digits and plus or minus signs. You read cells along a right-and-down walk as an arithmetic expression, subject to simple well-formedness rules, and must find the largest value obtainable. It tests careful state tracking over a two-dimensional grid.
Coding QuestionsCapital OneMarkov Chain n-Step Transition Probability Calculation
3/5A coding question on Markov chains: given a one-step transition matrix, find the probability that a chain started in one state is in another after a given number of steps, where the step count can be very large.
Coding QuestionsSIGValid Passwords
3/5A coding question on counting lowercase strings of a given length in which no letter repeats too many times in a row, with the result taken modulo a large prime.
Coding QuestionsMathWorksThree-Column Grid Coloring Count
3/5A coding question on counting the valid colorings of a narrow grid under neighbor-difference rules, with the count reported modulo a large prime. It checks how you model repeated structure and keep the arithmetic bounded for thousands of rows.
Coding QuestionsIntuitMenu — Minimum Cost to Cover Wanted Items
3/5A coding question on choosing the cheapest overlapping packages to cover a required set of items. It tests how to model small subsets compactly and combine partial results into a minimum total.
Coding QuestionsAirbnbDNA Substring Palindrome Cost Sum
3/5A coding question about strings and substrings: measure how far every part of a genetic sequence is from being a mirror image, and combine those distances into one exact total. It rewards reusing work between overlapping pieces instead of recounting each from scratch.
Coding QuestionsIntuitRobbing a Tree
3/5Presented during Zip software engineering interviews, this graph theory problem asks you to maximize accumulated value across a hierarchical village network where adjacent nodes cannot be selected simultaneously. It builds upon classic dynamic programming concepts on trees, requiring you to handle general multi-branch relationships rather than standard binary constraints. Discover the complete problem guidelines and optimized algorithmic solution with a paid subscription.
Coding QuestionsZipMinimum XOR Sum Over Permutations
4/5A coding question on pairing the elements of two arrays through a reordering so that a bitwise cost over the pairs is as small as possible. It tests how you search an assignment space that is too large to enumerate naively.
Coding QuestionsMongoDBFind Maximum Number of Strings
3/5This coding challenge, reported in technical rounds at Moveworks, requires candidates to compute the total quantity of valid alphabetic text sequences of a specified length. The core rule dictates that any pair of consecutive letters must maintain an alphabetical distance within a given threshold. This exercise evaluates your proficiency with dynamic programming, combinatorics, and efficient mathematical computation over large bounds. Access to the comprehensive problem statement and verified model solution requires an active subscription.
Coding QuestionsMoveworksCompute the Distribution of LLM Decoding Stopping Time and Build a Strategy Against Adversaries
4/5Model when a language model stops generating, then play against an adversary who gets to choose the worst stopping behaviour for you. This two-part OpenAI question starts with the probability distribution over decoding length and expected token count, and then turns into a minimax decision problem solved with dynamic programming. You will connect a per-step stop probability to a full distribution, handle the forced stop at the length cap, and reason about optimal play on both sides. Access to the full problem and the complete derivation requires a subscription.
LLMs & Prompt EngineeringOpenAI
Studied alongside
Dynamic Programming interview FAQ
- How many Dynamic Programming interview questions are there?
- 196 reported questions, mostly Coding Questions.
- Which companies ask Dynamic Programming questions?
- Amazon (43), Google (16), Snowflake (11), Uber (6), Meta (6), Rubrik (5), Databricks (4), Agoda (3).
- How hard are Dynamic Programming questions?
- They average 3.3 out of 5: 1 at 1/5, 11 at 2/5, 121 at 3/5, 63 at 4/5.