Graph Interview Questions
198 interview questions in our bank cover Graph, most of them Coding Questions. They average 3.1/5 difficulty — medium — and each one was reported by a candidate after a real interview. Companies known to ask about Graph: Amazon, Google, Uber, Microsoft, Apple, and 15 more.
Practice these on the problems board →Companies that ask about Graph
Question mix
- Coding Questions198
Difficulty
- 2/5 — easy12
- 3/5 — medium153
- 4/5 — hard33
Graph questions at Amazon
Employee Importance
2/5Add up the importance score of one employee together with everyone below them in the reporting chain, direct reports and their reports alike. This Amazon question is a traversal over a hierarchy given as a flat list, so the first real step is building the lookup that turns identifiers into records. You will choose between recursion and an explicit stack, avoid revisiting nodes, and reason about depth on a deep chain. Subscribers can read the full problem and the reference solution.
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 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 QuestionsAmazonPath Exists in a Binary Maze
2/5Explore a classic grid-traversal puzzle frequently encountered in Amazon interview loops, focused on determining route viability through an obstructed matrix. Candidates are tasked with identifying whether an open path exists between two specific coordinates within a grid containing passable and blocked cells. The exercise evaluates graph search fundamentals using either breadth-first or depth-first traversal strategies. The complete problem details and optimal model solution require a subscription.
Coding QuestionsAmazonStocked Fulfillment Centers Within a Route Limit
3/5A coding question on a network of sites joined by two-way links. Given one site that needs supplies, list the other sites that hold stock and lie close enough to it, where closeness is counted in hops along the shortest connection.
Coding QuestionsAmazonNumber of Friend Circles
3/5As reported in an Amazon interview, this problem requires you to identify the total number of distinct "friend circles" within a group of people. You are given a matrix representing direct friendships, and it's important to remember that friendship is transitive – if A is friends with B, and B is friends with C, then A, B, and C all belong to the same circle. Your task is to count how many separate, unconnected groups of friends exist. This tests graph traversal algorithms and connectivity analysis. The full problem and model solution require a subscription.
Coding QuestionsAmazonMax Value Range Across Connected Components
3/5Evaluating graph connectivity and analyzing structural extremes forms the foundation of this engaging Amazon interview question. You are tasked with examining a network of vertices and edges, grouped into distinct components, to find the maximum disparity between node values across any single component. This problem assesses your ability to traverse graph topologies efficiently while tracking aggregate statistics within clusters. Solving this cleanly demonstrates strong command over fundamental graph algorithms and data structures. To view the complete breakdown and optimal code solution, please consider subscribing.
Coding QuestionsAmazonWord Ladder II — All Shortest Sequences
4/5Tackle this classic graph traversal challenge featured in Amazon technical interviews. The objective involves finding every shortest transformation pathway between a starting term and a target term by modifying single letters step by step through an approved vocabulary dictionary. This exercise tests your proficiency with breadth-first search algorithms and backtracking techniques to reconstruct multiple optimal paths efficiently. Discovering the complete problem description alongside an optimized reference solution requires an active subscription.
Coding QuestionsAmazonReconstruct Trip Route From Tickets
2/5Navigating sequence reconstruction challenges is a frequent test of graph traversal and mapping logic in technical assessments reported at Amazon. This puzzle evaluates your ability to process unordered directional travel legs and arrange them into a single continuous pathway from origin to destination without branching confusion. Success depends on selecting appropriate data structures to track connections and efficiently stitching the segments together. Unlock the full problem details and complete model solution with a subscription.
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 QuestionsAmazonSynchronization of Data across Servers
3/5Work out the shortest time for a chosen set of machines arranged in a ring to all hold the same data, passing it one hop at a time. This Amazon question reduces to a distance question on a cycle, where the answer depends on the largest gap between consecutive chosen machines rather than on their count. You will compute the circular gaps including the wrap-around one, convert the largest gap into a time, and handle a single chosen machine. Subscribers get the complete problem and the model solution.
Coding QuestionsAmazonCount Connected Components (Union-Find)
3/5Understanding graph connectivity and equivalence classes is essential for tackling complex network problems, frequently featured in Amazon technical evaluations. This exercise challenges you to group interrelated items based on transitive relationships and efficiently count the resulting isolated components or track group sizes. You will explore advanced data structures designed to perform fast union and find operations on disjoint sets. Unlock the comprehensive problem description and the complete model solution with an active subscription.
Coding QuestionsAmazonDiameter of an Undirected Graph
3/5Graph theory concepts frequently appear in advanced technical interviews, such as this structural assessment reported at Amazon. The challenge asks you to determine the longest shortest path spanning an undirected network, measuring the maximum distance across connected components. Solving this requires deep familiarity with traversal algorithms like breadth-first search and efficient distance tracking. Discover the complete problem breakdown and a robust model solution by securing a paid subscription.
Coding QuestionsAmazonSocial Network Best-Friend Recommendation
3/5Examine this Amazon interview question centered on modeling directed social graph relationships and preference queries. You will build a system that tracks connection weights, identifies top preferences with tie-breaking rules, and resolves multi-hop recommendation chains between network participants. This challenge evaluates graph traversal, dictionary management, and data structure design. Access the complete problem description and optimal solution architecture through a subscription.
Coding QuestionsAmazonMinimum Steps in a Binary Grid
2/5Navigate a two-dimensional space containing open paths and impassable barriers to find the shortest route between a starting coordinate and a destination point. This frequently encountered coding challenge evaluates your ability to apply graph traversal techniques and shortest-path algorithms efficiently on a grid structure. Reported as an actual technical interview question at Amazon, it tests your proficiency with breadth-first search methodologies under spatial constraints. The complete problem statement, optimal algorithmic approach, and thoroughly tested source code require a subscription to access.
Coding QuestionsAmazonMinimum Rooks After Captures
3/5Combinatorial optimization on grid matrices frequently appears in technical screenings, as highlighted by this reported Amazon interview question. You are tasked with minimizing the number of pieces remaining on a board after applying specific capture rules along rows and columns. This puzzle examines your strategic thinking and ability to reduce complex matrix interactions to their simplest form. Access to the full problem details and efficient algorithmic solution requires an active subscription.
Coding QuestionsAmazonURL Access Reachability
3/5This graph connectivity problem, documented from Amazon technical interviews, involves determining whether a path exists between two specific nodes within a network of directed links. Given a collection of source-destination relationships, your task is to verify reachability efficiently. This exercise evaluates your understanding of graph traversal algorithms, such as depth-first or breadth-first search, and graph representation techniques. Reviewing the complete prompt and optimal solution requires an active subscription.
Coding QuestionsAmazonMulti-Source BFS Shortest Distances
3/5This Amazon coding challenge focuses on graph traversal techniques, specifically an adaptation of Breadth-First Search. You are presented with an undirected graph and a collection of starting points. The objective is to efficiently determine the shortest path distance from the nearest initial source to every single node within the graph. This problem assesses your understanding of fundamental graph algorithms and their application in scenarios involving multiple origins. The full problem and model solution require a subscription.
Coding QuestionsAmazonAll Paths From a Start Node in a DAG
3/5Examine this graph traversal challenge commonly featured in Amazon technical assessments. The task tests your understanding of directed acyclic networks and recursive enumeration techniques to map out every possible route from an origin to a terminating node. Implementing an effective traversal strategy is crucial for handling complex branching structures correctly. Unlock the complete problem details, edge case considerations, and optimal solution code with a subscription.
Coding QuestionsAmazonMinimum Replacements to Make Array Contiguous
3/5A coding question about replacing values in an array so that equal values end up side by side. The task is to count the fewest bulk replacements needed, which depends on how the positions of different values interleave.
Coding QuestionsAmazonServices Affected by a Shutdown
2/5A coding question on propagating failures through a dependency graph. Given the services that are shut down, the candidate must find every service that ends up unavailable, covering shared dependencies and services that appear in no edge.
Coding QuestionsAmazon
Graph questions at Google
Minimize the Maximum Cell on a Grid Path
4/5A coding question on routing through a numeric grid where a path is judged by its single worst cell instead of the total. You must find the route whose largest value is smallest, which exercises weighted-graph reasoning on a 2D map. A subscription is needed to see the full statement and a model solution.
Coding QuestionsGoogleDivide 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 QuestionsGoogleLargest Group of Two-Digit Numbers Sharing Digits
3/5A coding question about grouping numbers by the digits they have in common, where membership chains through intermediate numbers. The answer is the number of entries in the biggest resulting cluster.
Coding QuestionsGoogleServer Distances Avoiding Failed Servers and Their Radius
3/5A coding question on a network of servers where some have failed and a failure also takes down its surroundings. Compute minimum hop counts from a start server to every server that can still be reached safely.
Coding QuestionsGoogleMinimum Direction Violations
3/5Travel between two nodes of a directed graph while going the wrong way along as few edges as possible, where following an edge forwards is free. Asked at Google, the zero-and-one cost structure is the hint: a double-ended queue gives the shortest path without the overhead of a full priority queue. You will add reverse edges with unit cost, push free moves to the front of the queue, and report when the destination is unreachable. A subscription unlocks the full problem and the model solution.
Coding QuestionsGoogleMerge Two Sequences Preserving Each Order
3/5A coding question on combining two integer sequences into one list with no repeated values while keeping the relative order inside each sequence. It asks whether a merge exists, when it is unique, and how to get the lexicographically smallest one.
Coding QuestionsGoogleDepth-First Search on a Colored Graph
3/5A coding question on walking a directed graph from a start node, reporting the visiting order and whether a loop is reachable, including very long paths and missing nodes.
Coding QuestionsGoogleActivate Features with Prerequisites
3/5A coding question on switching on a target product feature whose prerequisites depend on other features. The learner returns a safe order that includes only what the target needs and must reject impossible requests where features depend on each other in a loop.
Coding QuestionsGoogleShortest Path with a Mandatory Waypoint
3/5A coding question about routing in a directed network with weighted roads. The learner returns the length of the cheapest trip from a start to a destination that is forced to stop at one given checkpoint, or reports that no such trip exists.
Coding QuestionsGoogleShortest Directed Cycle Through a Node
3/5This Google interview question challenges candidates to find the shortest loop that originates and terminates at a specific vertex within a directed network. The exercise evaluates graph traversal proficiency, specifically testing your ability to adapt search algorithms to detect circular paths efficiently while managing cases where no such loop exists. The complete problem description and model solution require a subscription.
Coding QuestionsGoogleEarliest Time When Everyone Becomes Connected
3/5A coding question about a group of people who become acquainted over time, asking for the first moment at which everyone is linked to everyone else, directly or through mutual acquaintances, or that no such moment exists.
Coding QuestionsGoogleReachability with Flight Schedule Constraints
3/5A coding question on finding the earliest way to reach one airport from another through scheduled connections. It tests modelling time-respecting routes and efficient search over many flights.
Coding QuestionsGoogleLargest Chain Reaction from One Explosion
3/5A coding question about explosive charges on a plane, each with its own blast radius, where one blast can set off others in a cascade. You must return the most charges that can go off after igniting just one of them by hand.
Coding QuestionsGoogleCount Connected Building Components in a City Grid
3/5A coding question on counting the separate groups of buildings on a city map stored as a grid of cells. A follow-up also joins buildings that meet only at a corner.
Coding QuestionsGoogleFind All People Who Learn a Secret
4/5People pass a secret on whenever they meet someone who already knows it, and several meetings can happen at the same moment. Work out who ends up knowing it after a timeline of pairwise meetings, paying attention to what can happen inside a single timestamp.
Coding QuestionsGoogleFriendship Connectivity Queries
3/5A coding question about keeping track of who is linked to whom as new links arrive, answering interleaved queries about whether two people are reachable from one another through any chain of links. It stresses efficient incremental updates and clean handling of people who were never mentioned.
Coding QuestionsGoogleMaintain Manager/Peer Relationships and Answer Queries
3/5A design question about an employee reporting chart that answers who manages whom, directly or through a chain. It tests data modeling, edge cases such as cycles and reassignment, and query cost.
Coding QuestionsGoogle2D Points Connected Components by Radius
3/5Tackle a geometric clustering problem where spatial coordinates must be grouped based on a proximity threshold, a classic coding interview question encountered at Google. This challenge tests your proficiency with graph traversal techniques and disjoint-set data structures to efficiently determine transitive relationships among coordinates. You will practice optimizing neighborhood scans and managing spatial connectivity to compute the final cluster count. Unlock the comprehensive breakdown and fully optimized model solution with a subscription.
Coding QuestionsGoogleDo Two Individuals Share a Common Ancestor?
2/5A coding question about family trees stored as a child-to-parents map. You decide whether two individuals have an ancestor in common, handling roots, repeated ancestors and malformed data. Access to the full statement and reference solution requires a subscription.
Coding QuestionsGoogleValidate Feature Requests Against Dependencies
3/5A graph question on checking that a requested set of features includes everything those features depend on, directly or indirectly, and on handling circular dependencies. It tests how missing items and invalid configurations are reported.
Coding QuestionsGoogle
Graph questions at Uber
K-th Employee Receiving Data
3/5Trace how information spreads through a reporting hierarchy and report who receives it at a given position in the order. This Uber question specifies the propagation precisely: a person is served first, then passes it to their reports in ascending identifier order, each doing the same. You will build the child lists from the manager array, traverse in exactly that order, and answer several queries without redoing shared work. A subscription unlocks the full problem and the reference solution.
Coding QuestionsUberNumber of Islands (Plain and Streaming)
4/5A coding question on counting separate regions of land in a grid map, then keeping that count correct while water cells turn into land one by one. It checks neighbour rules at row boundaries, repeated additions, a single cell that joins several regions, and an efficiency bound on the incremental version.
Coding QuestionsUberCount Ball Clusters on a Grid
3/5This Uber interview question explores spatial relationships by asking you to find the minimum number of isolated clusters formed by coordinate points on a grid based on a distance threshold and transitive attraction rules. You must compute connected components to determine how many separate chain reactions are necessary to sweep through all coordinates. It is a brilliant test of graph traversal and geometry algorithms. Full problem details and the complete model solution are available to subscribers.
Coding QuestionsUberRecover the Letter Order of an Unknown Alphabet
4/5A coding question about reconstructing an unknown alphabet from a list of words that is already in dictionary order. You must return a consistent letter ordering, or report that the input contradicts itself.
Coding QuestionsUberFewest Cells to Join Two Islands
3/5A grid question about joining two separate regions of land by filling in the fewest empty cells between them, on grids up to 100 by 100.
Coding QuestionsUberAnswer Ratio Queries from Known Quotients
3/5A coding question about deducing unknown quotients: you get a list of facts stating how one variable compares to another by division, and must answer a batch of ratio questions or report that the facts do not determine them.
Coding QuestionsUberBuild Order for a Service and Its Dependencies
3/5A coding question on build systems: given which services depend on which, list everything one target needs in an order that builds each service after its dependencies, or report that no such order exists.
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 QuestionsUberCheapest Flights Within K Stops
3/5This classic Uber interview problem challenges you to find the most economical travel route between two locations across a network of directed flight paths while respecting a strict limit on intermediate stops. You must navigate graph traversal constraints to determine the absolute lowest cost or identify if a valid journey is impossible under the given restrictions. Mastering this exercise sharpens your proficiency with advanced shortest-path algorithms and constrained graph exploration. To view the full problem statement and receive a detailed model solution, subscribe today.
Coding QuestionsUberChecking Existence of Edge Length Limited Paths
3/5This Uber interview question challenges you to process a network of connected nodes and evaluate connectivity queries subject to strict edge-weight thresholds. It evaluates your grasp of graph traversal algorithms and efficient offline query processing strategies. Upgrade your account to access the complete problem details and optimal code implementation.
Coding QuestionsUberMinimum Knight Moves on Infinite Chessboard
3/5This engaging puzzle has been reported in coding interviews at Uber and tests your graph traversal capabilities on an infinite grid. The objective is to compute the shortest route for a standard chess piece to travel from a designated origin to a specific destination point. Solving this efficiently typically involves employing breadth-first search heuristics and coordinate geometry. The entire problem details and the accompanying model solution require a subscription.
Coding QuestionsUberShortest Jumps in a Circular Array (Exact Left/Right Jumps)
3/5Find the fewest jumps from one position of a circular array to another, where each position forces a jump of its own length in either direction. This Uber question is a shortest-path search in disguise: the positions are nodes and each one has exactly two outgoing moves, so a breadth-first sweep gives the answer. You will handle the wrap-around arithmetic for both directions, mark visited positions to avoid cycling, and report unreachable targets. A subscription unlocks the full problem and the model solution.
Coding QuestionsUberBus Routes (Minimum Buses to Destination)
3/5This Uber coding challenge asks candidates to figure out the fewest vehicle lines needed to navigate between two specific locations within a transit network. The task tests graph traversal capabilities, specifically treating transportation loops as nodes and connections as edges to find the shortest path. To unlock the complete problem context, constraints, and professional model code, a subscription is required.
Coding QuestionsUberEarliest Time to Connect All Riders
3/5A coding question about timestamped pairwise interactions between people: find the first moment at which every person is reachable from every other, or report that it never happens.
Coding QuestionsUber
Graph questions at Microsoft
Check Path Presence
3/5Check whether an undirected graph lets you walk from the first vertex to the last by visiting the vertices in strictly increasing numeric order. Asked at Microsoft, this is deliberately not a reachability question: the route is fixed in advance, so the only thing to verify is that every consecutive pair is directly connected. You will build a fast edge lookup, scan the required sequence once, and handle duplicate or self edges without confusion. The full problem and the reference solution are available with a subscription.
Coding QuestionsMicrosoftPossible Bipartition Variation
3/5Decide whether a group of people can be split in two so that no pair who refuse to be together ends up on the same side. Asked at Microsoft, this is a two-colouring question on the conflict graph, and the detail that trips people is that the graph can be disconnected, so every component needs its own search. You will colour as you traverse, detect the odd cycle that makes a split impossible, and handle people with no conflicts at all. The full problem and the reference solution require a subscription.
Coding QuestionsMicrosoftFind Suitable Locations
3/5A Microsoft grid question: given a map of empty lots and homes, count the lots from which a new shop would be near enough to every single home. A direct approach measures each lot against each home; the efficient one notices that only a few extreme homes matter. You will reason about grid-step distance, handle maps with no homes, and aim for one pass over the grid. Subscribe for the full statement and the reference solution.
Coding QuestionsMicrosoftDNA Shotgun Assembly from Tagged Fragments
4/5A coding question on rebuilding a DNA string from short fragments tagged at both ends. You first order fragments whose reading direction is known, then handle fragments that may be read in either direction, where reversed text and a precise rule for choosing among several valid assemblies both matter.
Coding QuestionsMicrosoftDistance from Each Node to the Cycle
3/5Reported as an interview question at Microsoft, this graph theory challenge requires candidates to analyze network structures containing a single cyclic component with attached tree branches. The objective is to compute the shortest path from every vertex in the graph to the nearest node residing on the primary cycle. This problem evaluates graph traversal techniques and iterative node reduction strategies. Unlock the complete problem details and the optimal model solution by acquiring a paid subscription.
Coding QuestionsMicrosoft15-Puzzle Minimum Moves (BFS)
3/5Reported as a Microsoft interview problem, this challenge requires you to compute the shortest path to solve a classic sliding tile puzzle board. The core task evaluates your graph traversal skills, specifically utilizing state-space search algorithms to determine the minimum number of transitions needed to reach the target configuration. You must also account for solvability constraints and handle state space explosions efficiently. Get full access to the problem details and optimal code implementation with a subscription.
Coding QuestionsMicrosoftMinutes Until Every Fresh Cell Spoils
3/5A coding question about a grid of empty cells, fresh produce and spoiled produce, where spoilage passes to side-adjacent fresh pieces once per minute. The learner returns how many minutes go by before nothing fresh is left, or -1 when some fresh piece is out of reach, on grids up to two hundred by two hundred.
Coding QuestionsMicrosoft
Graph questions at Apple
Two-Color an Undirected Graph (Bipartite Check)
3/5A coding question on undirected graphs given as a list of pairs: can the vertices be split into two groups with every connection crossing between groups? It probes care with graphs made of several separate pieces, isolated vertices, repeated pairs and vertices joined to themselves, at a size where a deep call stack is not an option.
Coding QuestionsAppleKubernetes Service Filter and Dependency Chain
3/5A coding question on infrastructure records. The task is to select services by their properties, list everything a service relies on, and report the health of that whole group while detecting circular or missing links. It ends with an open design discussion about making the code usable by an agent.
Coding QuestionsAppleCheapest Flights Within K Stops
3/5A coding question on weighted routes between cities. The task is to find the lowest total fare for a trip that may make only a limited number of intermediate stops, or to report that no such trip exists.
Coding QuestionsAppleReconstruct Itinerary
4/5A coding question on ordering a set of one-way flight tickets into a single trip from a fixed home airport that uses each ticket once. It tests reasoning about repeated tickets, routes that loop back through the same airport, dead ends that must come last, and a lexical tie-break between valid trips.
Coding QuestionsAppleCompleting All Courses with Prerequisites
3/5A coding question on deciding whether a set of courses with prerequisite requirements can all be completed in some order. It tests how you reason about dependencies that may circle back on themselves.
Coding QuestionsAppleBus Route Earliest Arrival Time
4/5A coding question about public transport timetables: given several routes with their stops, travel times and departures, work out the earliest moment a traveller can reach a destination from a given place and time.
Coding QuestionsAppleRemove One Edge to Restore a Tree
3/5A coding question on undirected graphs: a tree received one added edge, and the task is to pick the edge to delete so that the graph is a tree again. Answers must follow a stated tie rule and keep each edge exactly as given.
Coding QuestionsApple
Graph questions at Snowflake
Wiki Hopper: List Every Page Reachable by Links
3/5A graph traversal coding question about collecting every page of a linked site that a reader can reach from one starting page. It stresses loops between pages, repeated links, very long chains and a stable result order, and the discussion then turns to making the exploration concurrent.
Coding QuestionsSnowflakeRadio Waves
3/5Find the longest path through a network of transmitters where every consecutive pair along the route broadcasts on frequencies within one step of each other. Asked at Snowflake, the network is a tree, so the answer is a constrained diameter: the usual two-pass or rooted-depth technique still applies, but an edge only counts when the two frequencies are compatible. You will compute the best downward reach per device, combine two branches at each device, and return zero when no pair can reach each other at all. The complete problem and the reference solution are available to subscribers.
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 QuestionsSnowflakeDAG Allow/Disallow Letter Propagation
3/5Encountered frequently in Snowflake interviews, this graph theory challenge requires you to compute cumulative permissions across a directed acyclic structure. Nodes possess additive and subtractive attributes that propagate downward to all descendants, with strict precedence rules governing conflicts. The problem tests your graph traversal strategies and state propagation logic over hierarchical data. The full problem and model solution require a subscription.
Coding QuestionsSnowflakeWiki Page Shortest-Click Path
2/5In this Snowflake interview question, you are asked to determine the shortest navigation path between two web pages within an implicit graph where connections are only revealed through a provided lookup utility. The core challenge is to minimize expensive remote queries while traversing linked nodes and avoiding redundant checks through proper deduplication strategies. This tests your implementation of breadth-first search on dynamically discovered relationships. Review the full problem statement and study the comprehensive model solution by upgrading your subscription.
Coding QuestionsSnowflakeService Failure Forensics: Logs and Dependencies
3/5A coding question on outage analysis with two inputs: an application log that switches to errors at some line, and a service dependency map. The learner locates where the errors start, lists every service brought down by one failure, and measures the deepest cascade of failures.
Coding QuestionsSnowflakeMinimum Time to Finish All Courses
4/5A coding question on scheduling courses that have prerequisites and different durations, where several courses may run at once. You compute the earliest time by which everything can be finished.
Coding QuestionsSnowflake
Graph questions at OpenAI
Minimum Time to Infect a Network
3/5Find how long a contagion takes to reach every machine in a network when several machines are already compromised and infection spreads one hop per minute. Reported at OpenAI, this is a multi-source breadth-first search, and the giveaway mistake is running one search per seed instead of seeding the queue with all of them at once. You will push every infected node in as the starting layer, count layers rather than paths, and detect the unreachable case. Subscribers can read the complete problem and the model solution.
Coding QuestionsOpenAIFriend Circles / Number of Provinces
3/5Count the connected friend groups in a social network given as a dense adjacency matrix, where friendship spreads transitively through mutual acquaintances. This OpenAI screen is a graph-traversal fundamental with a twist of representation: the input is a matrix, so the cost of visiting neighbours is different from an edge list. You will choose between depth-first search, breadth-first search, and union-find, and argue the complexity that follows from the matrix form. The full problem and model solution are available to subscribers.
Coding QuestionsOpenAIResolve Python Dependency Versions
4/5Resolve a set of package requirements into an installable plan, honouring version ranges and reporting an honest conflict when no plan exists. Reported at OpenAI, this engineering-heavy question grows through several stages and rewards correctness and clear data modelling over clever optimisation. You will model constraints as a graph, order work so that dependencies come first, and distinguish a genuine conflict from a resolution order you have not tried yet. A subscription gives access to the complete problem and the reference resolver.
Coding QuestionsOpenAIOpenSheet: Spreadsheet with Cell Dependencies
3/5In this coding interview question reported at OpenAI, you are asked to build a mini spreadsheet application that manages cell references, mathematical formulas, and automatic dependency updates. The challenge requires handling arithmetic operations while detecting and preventing circular references among cell links, with follow-ups exploring optimized evaluation graphs. It tests your graph traversal algorithms, state management, and object-oriented design capabilities. Access to the complete problem breakdown and verified model solution requires a subscription.
Coding QuestionsOpenAITime-Aware Social Network Follow Graph with Recommendations
4/5Design a follow graph where every edge carries the moment it came into effect, so any query has to be answered as of a point in time. This OpenAI design-and-code round grows in stages: point-in-time lookups first, then reverse-direction queries, then friend-of-friend recommendations. You will choose a representation that keeps both directions queryable, decide where to binary search over time, and keep recommendation counting from degrading to a full scan. The full problem and reference code are behind a subscription.
Coding QuestionsOpenAIDraw Paths / Strokes on a Set of Points
3/5Work out the fewest continuous pen strokes needed to draw every line segment of a figure, where no segment may be retraced. This OpenAI question is a classic graph result in disguise: the answer falls out of vertex parities and connectivity, not from a search over drawing orders. You will count odd-degree vertices per connected component, handle components that are already closed circuits, and ignore isolated points that need no stroke at all. A subscription unlocks the full problem and the complete derivation.
Coding QuestionsOpenAI
Graph questions at ByteDance
Min Cost to Connect All Points (Manhattan MST)
3/5Finding optimal network connections in a multi-dimensional space is a fundamental graph theory challenge, featured here as a reported ByteDance interview question. Applicants are asked to determine the absolute minimum expenditure required to link a scatter of coordinates using grid-based distances, effectively building a minimum spanning tree. This problem tests your expertise in advanced graph algorithms and efficient edge weighting strategies. Unlock the full challenge details and a robust algorithmic solution with your subscription.
Coding QuestionsByteDanceWord Ladder: Shortest Transformation Sequence
4/5A coding question on determining how many words, including the starting and target endpoints, belong to the shortest permitted chain, with zero for an unreachable target.
Coding QuestionsByteDanceAll Paths Lead to the Destination
3/5A coding question about validating whether every possible route through a directed graph finishes at one required endpoint. The tricky cases include alternate terminal nodes and routes that never terminate.
Coding QuestionsByteDanceMaximum-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 QuestionsByteDanceCourse Schedule and Topological Sort on a Directed Graph
3/5Graph theory and dependency resolution are core competencies evaluated during engineering interviews at industry giants like ByteDance. This interview question requires you to analyze a directed network to identify cyclic dependencies and establish a valid sequential workflow order. It tests your mastery of traversal strategies, cycle detection algorithms, and in-degree tracking techniques. Review the full problem guidelines and optimal algorithmic solution by obtaining a subscription.
Coding QuestionsByteDancePhoto Groups via Transitive Similarity
3/5This ByteDance interview question challenges engineers to partition a collection of visual items into distinct clusters based on transitive relational data. The exercise examines graph traversal techniques and disjoint-set data structures to efficiently compute connected components within a relationship matrix. Success depends on recognizing how equivalence relations translate into graph connectivity problems. To view the full problem statement along with the complete optimal implementation, a subscription is required.
Coding QuestionsByteDance
More Graph questions
Account Merge / User Deduplication
3/5This identity consolidation problem was featured in an Airbnb coding interview, focusing on duplicate detection across multi-attribute user records. You need to design an algorithm that processes registration streams sequentially, linking profiles that share common identifiers while preserving the original owner. The exercise evaluates graph connectivity concepts and state tracking proficiency. Unlock the full problem details and efficient reference solution by subscribing.
Coding QuestionsAirbnbService Dependency Shortest Latency Path
3/5Practice this network routing challenge reported from Snapchat engineering interviews. The problem evaluates your competency in modeling interconnected system dependencies and computing optimal pathways based on weighted cost metrics. You will need to apply fundamental graph algorithms to handle connection latencies and manage unreachable destinations robustly. Gain full access to the complete problem guidelines, architectural considerations, and step-by-step solution code through a subscription.
Coding QuestionsSnapchatMaximum Reporting Layer (Tree Height)
2/5Measure how many levels deep a company's reporting structure goes, given the manager-to-report pairs rather than a ready-made tree. This Rippling question is a height computation whose first step is building the child lists; after that it is one traversal. You will decide between a breadth-first level count and a recursive depth, agree on whether the root counts as a level, and handle a company of one person. A subscription unlocks the complete problem and the reference solution.
Coding QuestionsRipplingCart Routes Origin Destinations
3/5This Atlassian interview question examines graph traversal and connectivity analysis by asking you to map out delivery routes for autonomous factory carts. Given a collection of directed path segments, you must identify all foundational starting points and trace every reachable terminal destination downstream. The evaluation focuses on your proficiency with graph structures, node relationships, and pathfinding logic. Access the full problem specifications and complete algorithmic solution by upgrading to a paid subscription.
Coding QuestionsAtlassianTask Scheduler with Priority
3/5This IXL interview challenge requires designing an efficient scheduling algorithm that sequences various operational tasks based on prerequisite constraints and individual urgency metrics. Candidates must correctly apply topological sorting principles combined with custom priority ordering to handle dependent workloads. This problem evaluates your graph theory knowledge and advanced sorting strategies in a practical pipeline context. Access to the full problem description and the model implementation requires a paid subscription.
Coding QuestionsIXLCount Strongly Connected Components Using Kosaraju's Algorithm
3/5Count the groups of nodes in a directed graph where every member can reach every other, using the two-pass transpose technique by name. Asked at Expedia, the question names the algorithm, so the interviewer is checking whether you know why the second pass works on the reversed graph in finishing order. You will produce the finishing order first, traverse the transpose, and handle nodes that stand alone as their own group. A subscription unlocks the complete problem and the reference implementation.
Coding QuestionsExpediaDebug Dijkstra Shortest Path for Navigation
3/5Prepare for automotive software engineering evaluations with this practical debugging exercise reported during a Tesla interview. You must review an existing graph traversal module designed for routing applications, locate logic flaws in its priority-queue-based shortest path logic, and evaluate its operational performance boundaries. This scenario tests your code comprehension, algorithmic correctness, and ability to reason about edge cases like negative weight cycles in routing graphs. Access the comprehensive walkthrough and verified code fix with a subscription.
Coding QuestionsTeslaQR HackerRank Profitable Pairs and Delivery Order
3/5This Akuna Capital online assessment features a dual-part technical evaluation focusing on financial pair optimization and network routing logic. The first segment examines combinations meeting specific profitability thresholds, while the second explores graph traversal and distance-based sorting across disconnected nodes. Candidates must demonstrate strong combinatorial reasoning and graph theory application to succeed. To view the full problem statements and expert solutions, a paid subscription is required.
Coding QuestionsAkuna CapitalPath Existence in Directed and Undirected Graphs with a Blocked Edge
3/5This Figma interview question evaluates your graph traversal skills by requiring you to handle multiple reachability queries under varying conditions, such as directed links, undirected connections, and dynamically blocked pathways. Testing your proficiency with advanced search algorithms and data structure updates, this problem assesses how well you adapt traversal logic on the fly. Access to the comprehensive problem breakdown and optimal model solution requires a subscription.
Coding QuestionsFigmaURL Maze — Recursive API Crawl to Congrats
3/5This Ramp interview challenge features an automated web traversal puzzle where developers must recursively request data endpoints, parse JSON payloads, and navigate through a directed graph of links until reaching a target destination. The problem evaluates graph exploration techniques, cycle detection, recursive logic, and resilience against network anomalies or authentication hurdles. Candidates need to build a robust crawler that filters paths and returns the terminal node securely. To explore the full problem requirements and an ideal solution, a paid subscription is required.
Coding QuestionsRampJob Tree Total Cost and Top Root Jobs
3/5A coding question on a tree of jobs linked by which job launched which. You roll each job's duration up into the total cost of its subtree, then compare the top-level jobs, pick a winner with a fixed tie-break rule and report the third-ranked total. Very deep nesting must be handled without overflowing the call stack.
Coding QuestionsCollegeVineChecking Your Route (Edges on Any Shortest Path)
4/5Encountered in WeRide technical screens, this graph theory challenge asks you to analyze a network of nodes and weighted connections to identify which specific links belong to at least one shortest route from start to finish. It tests advanced graph traversal algorithms, shortest path computations, and edge analysis. The comprehensive problem statement, structural breakdown, and model solution are restricted to subscribers.
Coding QuestionsWeRideSmall Business Network: Degrees of Separation
3/5Rooted in an Intuit QuickBooks engineering interview, this problem requires you to navigate a corporate network graph to determine the shortest relational distance between two distinct business entities. Given ambiguous requirements, you must first establish a robust data contract before computing the fewest degrees of separation through multi-step commercial partnerships. The exercise tests your graph traversal capabilities, requirement clarification skills, and pathway optimization techniques. Unlocking the full problem requirements and the optimal algorithmic solution requires a paid subscription.
Coding QuestionsIntuitGraph Traversal (Nodes Reachable from a Start)
2/5Traversing graph topologies to discover connected nodes is the core objective of this WeRide interview question, which requires finding every reachable vertex starting from a specific origin in an undirected network. This exercise evaluates your understanding of fundamental graph traversal strategies, such as depth-first or breadth-first search, alongside proper result formatting and duplicate prevention. Demonstrating fluency in these traversal patterns is vital for tackling complex pathfinding challenges. Access to the full problem description and optimal model solution requires a paid subscription.
Coding QuestionsWeRideFind Unreachable Heap Objects with References
3/5This graph traversal and memory management puzzle, featured in Anduril interviews, requires you to identify unreachable heap objects given an initial set of active stack references. You will analyze reference relationships between objects to perform garbage collection style reachability analysis and return all dead objects. Gain access to the full problem statement and optimal solution code with a subscription.
Coding QuestionsAndurilLongest Path in an Undirected Tree (Edge-List Diameter)
3/5A coding question about an acyclic connected network described by its links: how many links lie on the longest route between any two of its points? It checks whether a candidate can reason about where such a route must end, avoids assuming it passes through a particular point, and copes with long chain-shaped inputs without running out of stack.
Coding QuestionsQualcommValidate Adding a Directed Edge Without Conflict or Cycle
3/5Reported as a Hive interview question, this puzzle requires you to verify whether a new directed link can be safely integrated into an existing network structure. You must ensure that the addition neither creates a duplicate path nor introduces any circular loops into the system. This task examines your understanding of graph validation and cycle detection algorithms. To view the complete problem requirements and the optimal solution, subscribe now.
Coding QuestionsHiveService Dependency Impact Propagation
3/5Analyzing downstream repercussions within interconnected data pipelines is a vital skill for modern infrastructure engineers, mirroring this LinkedIn interview scenario. You will process manifest configurations to trace how removed data pathways ripple across various services through multi-tier cascading impact levels. This challenge evaluates your graph traversal capabilities and efficient state tracking over hierarchical relationships. Explore the complete problem details and comprehensive reference solution by upgrading to a paid subscription.
Coding QuestionsLinkedInMaximum Area of an Island in a Grid
3/5A coding question on a map stored as a grid of land and water cells. You measure the biggest landmass without altering the input, then redo it in a way that holds up on very large maps.
Coding QuestionsFlexportMaximum K-Star Sum
3/5In this reported interview question from MathWorks, candidates are asked to find the optimal star-shaped subgraph within an undirected network of weighted nodes. The objective is to select a central node and a limited number of connected neighbors that together yield the highest possible combined score. This problem evaluates your proficiency with graph traversal strategies, greedy decision-making, and efficient priority queue management. Access to the full problem description and expert model solution requires a subscription.
Coding QuestionsMathWorksMaximal Island Area in a Matrix
3/5A coding question on a binary grid: find the size of the biggest group of touching filled cells. It checks careful handling of neighbours, empty inputs and large single groups.
Coding QuestionsChewyCount Lakes Wrapped by a Given Island
3/5A grid question about a landmass and the bodies of water around it. It tests how carefully a candidate defines "enclosed", handles the grid border, and keeps the solution safe on very large inputs.
Coding QuestionsMetaSpreadsheet with Live Formula Cells
3/5A coding question on building a small grid of cells that hold text, numbers or arithmetic formulas over other cells. The difficulty is keeping every formula consistent when something it reads is edited later, and handling what happens when a formula cell is overwritten.
Coding QuestionsRampNumber of Good Pairs
3/5In this Commvault interview question, you are given an undirected graph and asked to calculate the total number of node pairs that reside in completely separate connected components. The challenge requires you to analyze graph topology and effectively group vertices to determine reachability between disconnected regions. It is an excellent test of graph traversal algorithms and disjoint-set data structures. Unlock the full problem details and the optimal model solution by acquiring a subscription.
Coding QuestionsCommvaultSatellite Message Propagation
4/5This Optiver coding challenge simulates a complex satellite communication network where messages propagate through a graph with specific delay and routing rules. Candidates must model message forwarding hierarchies, timing constraints, and feedback reporting order using robust object-oriented design and graph algorithms. The problem tests advanced simulation techniques and careful handling of tie-breaking scenarios in real-time systems. Access the full problem details and model solution by subscribing.
Coding QuestionsOptiverCourse Schedule (Topological Sort)
3/5Featured as a technical interview question at eBay, this problem evaluates your ability to model and solve prerequisite dependency graphs. Given a set of courses and their required ordering constraints, you must determine whether it is possible to complete all subjects without hitting a circular dependency, and if so, generate a valid sequential schedule. This is a classic application of topological sorting techniques in directed graphs. The full problem statement, edge cases, and optimized solution require a subscription.
Coding QuestionseBayChinese Chess Horse Reachability with Blocked Legs
3/5Reported as an interview question at eBay, this grid-based pathfinding challenge adapts the movement rules of a traditional Chinese chess piece. You are tasked with determining whether a horse can successfully navigate to a target location on a restricted board while avoiding obstacles and accounting for blocked pivoting legs that restrict L-shaped jumps. The puzzle evaluates your graph traversal skills and spatial reasoning under custom movement constraints. Unlock the comprehensive problem statement and verified model solution with a subscription.
Coding QuestionseBayMaximum Group Size by Overlapping Work Intervals (Connectivity via Overlap Paths)
3/5In this Rubrik interview question, you must analyze temporal intervals to determine connectivity patterns among a group of individuals. By modeling timeline overlaps as graph relationships, your task is to identify connected components and determine the maximum cluster size. This problem examines your expertise in graph theory, interval scheduling, and efficient traversal algorithms. The full problem specification and reference implementation are available to subscribers only.
Coding QuestionsRubrikNearest Fire Station Distance for Every Residential Cell
3/5A coding question on a city map with fire stations, impassable lakes and homes. For each home, the task is to report how far the closest station is when trucks may only move up, down, left or right, and to mark homes that no station can reach.
Coding QuestionsLinkedInKey Store With Sum-Dependency Cascades
3/5This Airbnb interview question requires you to build a dynamic key-value storage system capable of handling base assignments alongside dependent variables whose values automatically recalculate whenever their referenced keys change. It tests your graph traversal skills, dependency resolution mechanics, and memoization or propagation strategies for reactive data flows. Gain access to the full problem requirements, architectural patterns, and production-grade solution through our subscription.
Coding QuestionsAirbnbEnergy Crisis
4/5This Rubrik graph question asks you to label the nodes of a connected network with integers under rules that fix how far apart neighbouring labels may be, some with a forced direction, and to make the overall range of labels as wide as possible. It tests modelling with difference constraints, parity reasoning on graphs and shortest-path thinking, at a scale where brute force is not an option.
Coding QuestionsRubrikCount Levels
3/5In this BlackRock interview task, you are given a hierarchical list of employee and manager relationships to compute the distance or number of intervening levels between two individuals within an organization. The exercise evaluates your ability to model tree structures, construct adjacency graphs, and find paths or lowest common ancestors efficiently. Navigating hierarchical relationships is a practical skill frequently applied in enterprise software design. Gain full access to the problem breakdown and model solution by subscribing.
Coding QuestionsBlackRockDesign a Spreadsheet with Dependent Cells (set_cell / get_cell)
3/5Encountered in Character AI interview processes, this design challenge requires building a lightweight spreadsheet system capable of handling dynamic cell relationships and automatic updates. You must implement mechanisms to assign static values, establish parent-child dependencies, and recursively compute aggregated results when data changes. This problem tests your expertise in graph modeling, caching strategies, and state propagation in an object-oriented design. Unlocking the complete problem specification and reference solution requires an active subscription.
Coding QuestionsCharacter AIDependency Cycle Detection (Deadlock)
3/5Encountered frequently in Okta technical rounds, this problem asks you to analyze a directional resource dependency network to identify circular relationships that trigger deadlocks. It evaluates your graph traversal capabilities, specifically focusing on cycle detection algorithms using depth-first search or topological sorting techniques across interconnected components. Handling complex, disjointed networks cleanly is a hallmark of strong backend engineering. The full problem details and comprehensive model implementation require an active subscription.
Coding QuestionsOktaMaximum Time Required to Transfer Data
3/5Find the longest transfer time between any two machines in a network shaped as a tree, where each hop costs one unit. This Rippling question is the tree diameter, and the two-sweep technique is the expected answer: the farthest node from anywhere is an endpoint, and the farthest node from there gives the length. You will justify why two sweeps suffice, handle a single-machine network, and avoid the quadratic all-pairs computation. The complete problem and the reference solution are available with a subscription.
Coding QuestionsRipplingReconstruct Itinerary from Tickets (Eulerian Path)
4/5Reported as a Netflix interview question, this problem asks you to reconstruct a complete travel itinerary given a collection of individual flight segments. The primary goal is to assemble all provided tickets into a single, continuous journey, ensuring every segment is utilized exactly once. A specific starting point is mandated, and if multiple valid routes exist, the one that appears earliest alphabetically must be chosen. This task evaluates your ability to work with graph-like structures and apply traversal algorithms, potentially involving concepts related to Eulerian paths. The full problem description and a model solution are available with a subscription.
Coding QuestionsNetflixTree Diameter
3/5Explore how to determine the longest distance between any two vertices within an acyclic connected graph in this reported interview question from Verkada. This exercise evaluates your proficiency with graph traversal algorithms, tree properties, and efficient node distance calculations. You will learn how to approach hierarchical structures to find maximal spans without relying on a fixed root. Access to the complete problem breakdown and optimal model solution requires an active subscription.
Coding QuestionsVerkadaCalculate Total Ownership Percentage in a Subsidiary Graph
3/5Analyzing corporate hierarchies and multi-tier equity stakes is a classic graph problem featured in Veeva Systems technical interviews. This task requires computing cumulative ownership stakes across a directed acyclic network, where corporate entities can hold shares through multiple intermediary paths. You will need to aggregate these fractional holdings accurately by multiplying pathway probabilities and combining parallel contributions. Access to the full problem description, edge-case validations, and expert-written model solution requires an active subscription.
Coding QuestionsVeeva SystemsFlight Route Using Every Ticket
4/5A coding question about trip planning: given one-way flight tickets and a starting airport, produce a route that uses each ticket exactly once, choosing the alphabetically smallest route when several exist. Routes that come back to airports already visited and repeated tickets must be handled.
Coding QuestionsPinterestUniformly Sample a Minimum Spanning Connection of Groups
4/5As a challenging problem reported from Databricks engineering interviews, this task requires connecting multiple disjoint graph components using the absolute minimum number of edges while ensuring a uniform probability distribution across all valid spanning configurations. The problem evaluates advanced graph theory concepts, random sampling algorithms, and combinatorial awareness. Mastering this exercise demonstrates deep algorithmic competence in handling complex probabilistic structures. Gain immediate access to the full problem statement and professional solution through our paid subscription plan.
Coding QuestionsDatabricksTask Dependency Resolution (Topological Sort)
3/5Reported during interviews at Vanta, this challenge requires you to compute a correct execution sequence for a collection of interdependent jobs. It tests your proficiency with graph traversal algorithms, cycle detection, and topological sorting within a practical build-system context. You must filter and order tasks properly while eliminating redundancies to ensure a reliable deployment workflow. Access to the comprehensive problem breakdown and verified solution code requires an active subscription.
Coding QuestionsVantaMaximum 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 SigmaMaximum Completable Tasks with Prerequisites (Topological)
3/5Reported as an Oracle screening question, this graph-theoretic challenge requires determining the maximum number of milestones you can achieve given strict dependency constraints. Because certain pathways might contain circular dependencies, you must identify valid execution sequences using topological sorting principles. The puzzle evaluates your graph traversal skills and your ability to prune invalid branches efficiently. Unlock the complete problem text, underlying architectural patterns, and verified solution code with a subscription.
Coding QuestionsOracleSocial Likes: Best Friends and Friend Recommendations
4/5Analyzing graph relationships and user preferences is a staple of social network engineering, featured in this interview question reported from Lead Bank. The task requires you to process friendship networks and item interactions to compute top connections based on shared interests and generate tailored recommendations. This problem tests your graph traversal skills, sorting algorithms, and efficient data aggregation techniques. Unlocking the comprehensive problem statement and the complete reference solution requires an active subscription.
Coding QuestionsLead BankCourse Scheduler — Print Path (Simplified)
2/5Featured during a technical screening at Oracle, this simplified dependency resolution task requires candidates to generate an ordered sequence of study modules based on single prerequisite links. The challenge tests your graph traversal capabilities and how well you can map out linear execution orders under strict dependency rules. Interviewers use this scenario to evaluate clean implementation speed and foundational data structure handling within a tight timeframe. Access to the full problem description and the expert-crafted model solution requires an active subscription.
Coding QuestionsOracleChoice Options to Ending Rooms
3/5Navigate a system of interconnected pathways and choices to determine which destination chambers are ultimately accessible from a starting point. Originally featured in a technical screening for SoFi, this problem evaluates your ability to model state transitions and traverse complex networks using fundamental search algorithms like breadth-first or depth-first search. Candidates must handle branching logic and cyclical paths efficiently. Access to the comprehensive problem breakdown and verified model solution requires an active subscription.
Coding QuestionsSoFiInfection Simulation in a Grid
3/5Work out how many rounds it takes for an infection to cover a grid, where a clean cell only falls once enough of its four orthogonal neighbours are already infected. Asked at Anthropic, the threshold is what breaks the usual flood-fill instinct: a cell can sit adjacent to the infection for several rounds and still resist. You will update the whole grid in lockstep, recount neighbours each round, and recognise the case where some cells never become infected. The full problem and the model solution are available with a subscription.
Coding QuestionsAnthropicTransaction Settlement (Minimum Transfers)
4/5A coding question about a shared expense log: given who paid whom, find the fewest new payments that leave every person with a zero balance. Names are case-sensitive and the answer is a single count.
Coding QuestionsPinduoduoMerge Profiles by Shared Email
3/5A coding question on grouping user records that are linked by common contact details into single combined records. The output must list each person once, in a fixed order, with their contact details deduplicated and sorted.
Coding QuestionsElectronic ArtsDetermine Valid Build Order
3/5Presented during recruitment evaluations at Airtable, this problem requires you to establish a proper compilation sequence given a set of interconnected project files and prerequisite rules. You will need to organize tasks in a linear order that respects all directional dependencies without triggering conflicts. This task is ideal for practicing graph traversal, cycle detection, and topological sorting algorithms. View the complete problem details and professional solution code by subscribing today.
Coding QuestionsAirtableMaximum Island Perimeter
3/5Tackle this engaging matrix traversal challenge frequently asked in technical interviews at Snapchat. You are tasked with analyzing a binary grid representing land and water to locate all distinct land masses and compute their boundaries. Instead of simply counting components, your goal is to find the maximum perimeter across every identified region while efficiently handling edge cases like internal holes and boundary-touching components. Unlock the comprehensive problem description and optimal algorithmic solution with a paid subscription.
Coding QuestionsSnapchatFlatten Nested Child Lists in a Doubly Linked List
3/5Merge the nested child lists of a doubly linked list into one level in place, in a fixed traversal order, keeping every back-pointer correct. The input can be very deeply nested.
Coding QuestionsBloombergMinimal Edge Reversal in Directed Graph
3/5Given a directed graph, pick a starting node so that the fewest edges need to be flipped for every edge to lead outward from it. The task is to return that minimum number of flips.
Coding QuestionsHackerRankDerive Alphabet Order from Sorted Words
4/5Recover a letter order for an unfamiliar alphabet from words arranged in dictionary order under it, or report that no order exists. The learner must handle contradictory constraints and a longer word placed ahead of its own prefix.
Coding QuestionsMetaChain 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 TradingCourse Schedule Cycle Detection
3/5Tackle this essential graph theory problem featured in Snapchat interviews, which centers on dependency resolution and cycle detection. Given a set of tasks and their prerequisites, your goal is to determine if a valid completion order exists without running into circular blocks. This challenge tests your knowledge of depth-first search and topological sorting algorithms. Access to the full problem text and clean implementation details requires a subscription.
Coding QuestionsSnapchatMaximum Difference Across Connected Components
2/5Encountered in Akuna Capital recruitment rounds, this task requires analyzing an undirected network to discover connected subgraphs and calculate the span between the maximum and minimum node identifiers within each group. It evaluates your proficiency in graph traversal algorithms such as depth-first search or disjoint-set data structures. Unlocking the full problem guidelines, optimal constraints, and reference implementation requires a paid subscription.
Coding QuestionsAkuna CapitalAvoiding the Obstacles
4/5Featured in recent IMC Trading recruitment rounds, this grid traversal challenge requires finding a navigation route that maximizes safety from hazardous zones. You must compute a path to a target cell while keeping the closest distance to any barrier as large as possible using Manhattan metrics. This scenario examines your proficiency with advanced graph traversal, binary search on answer spaces, and shortest path algorithms. Unlock full access to view the comprehensive problem text, edge cases, and a clean, production-ready solution.
Coding QuestionsIMC TradingWord Ladder Reachability
3/5Master this Snapchat coding interview question, which puts a classic string transformation puzzle into a reachability context. Instead of finding the minimum distance between starting and ending lexicon entries, your goal is simply to determine if a valid sequence of single-character mutations exists within a given vocabulary. This problem evaluates your graph traversal capabilities, adjacency generation techniques, and depth-first or breadth-first search implementation skills. Unlock the full challenge details and verified model solution with a subscription.
Coding QuestionsSnapchatMaximize Currency After Two Days of Conversions
3/5This Rippling interview question requires maximizing asset value across sequential conversion stages governed by multi-day exchange rates and bidirectional trade options. Candidates must devise a robust strategy to navigate state transformations and compound multiplicative gains over time. Unlock the complete problem context, mathematical modeling strategies, and optimal implementation by subscribing.
Coding QuestionsRipplingFind Sizes of Connected Components in Undirected Graph
3/5In this C3.ai technical assessment, you are tasked with analyzing network relationships represented as an undirected graph. The objective is to partition the nodes into distinct subgraphs and compute the exact population size of each isolated cluster. This exercise evaluates your proficiency with graph traversal algorithms, such as depth-first search or disjoint-set data structures. Access the complete problem description and a comprehensive model solution by purchasing a subscription.
Coding QuestionsC3.aiImplement a DAG Utility Class (Add Edges, Validate, and Query)
3/5Featured in recent Notion interviews, this coding challenge requires you to design a robust directed acyclic graph utility to manage task dependencies. You will implement methods to dynamically insert edges while actively preventing circular relationships, verify graph integrity, and determine proper execution sequences. This problem tests your grasp of graph theory, cycle detection algorithms, and object-oriented design principles. Access the comprehensive problem specification and the optimal model solution by acquiring a subscription.
Coding QuestionsNotionReachable Nodes in a Directed Graph
3/5This reported interview question from SoFi evaluates your ability to traverse graph data structures while safely managing cycles and avoiding infinite loops. You will need to implement a routine that identifies every node accessible from a designated starting point, properly handling network connections. The exercise also probes your theoretical understanding of memory allocation differences between recursive traversal strategies and iterative queue-based approaches. To explore the complete problem statement, underlying edge cases, and a comprehensive model solution, a paid subscription is required.
Coding QuestionsSoFiCurrency Exchange Rate Converter
3/5Derived from Stripe's technical screening process, this problem asks you to calculate direct and optimal multi-hop conversion ratios across a network of interconnected currencies. The assessment examines your graph theory knowledge, specifically regarding shortest or most valuable path computations where edge directions and reciprocals matter. To review the full problem context, mathematical properties, and working implementation, consider subscribing today.
Coding QuestionsStripeCustomer Transaction Network
3/5Explore this multi-stage graph modeling exercise reported from Block, where you must design a system that dynamically tracks customer interactions and answers increasingly complex relationship queries. The task evaluates your ability to refactor code rapidly under changing requirements while maintaining clean and efficient data structures. Access to the full multi-part problem statement, architectural progression, and complete model solution requires a paid subscription.
Coding QuestionsBlockRBAC Role Resolver with Inheritance
3/5This Stripe interview question requires building a permission verification mechanism that handles hierarchical organizational structures. Candidates must write a resolver class capable of tracking user permissions across parent and child entities while correctly accumulating and filtering inherited authorizations. This exercise tests graph traversal techniques, efficient caching strategies, and data modeling for access control systems. Accessing the complete problem statement, test suites, and expert-crafted reference implementation requires a paid subscription.
Coding QuestionsStripeRecord Linkage by Weighted Similarity
3/5Featured in Stripe interview loops, this entity resolution problem requires grouping and connecting user records based on weighted multi-field similarity scores. Candidates must build algorithms that traverse relational graphs to identify direct matches, extended network hops, and entire connected components matching specific criteria. It evaluates your grasp of graph theory, similarity metrics, and efficient record linkage logic. Unlock the full challenge details, edge cases, and robust model solution with a subscription.
Coding QuestionsStripeTopological Sort with Declaration-Order Tie-Breaking
3/5Navigating complex prerequisite graphs with strict tie-breaking rules is a common theme in technical evaluations, as featured in this Roblox interview question. You are tasked with determining a valid execution sequence for a set of components while respecting declaration order and detecting cyclic or missing dependencies. This problem thoroughly examines your graph traversal algorithms and your attention to deterministic ordering edge cases. Unlock the full problem breakdown and verified model solution with a paid subscription.
Coding QuestionsRobloxService Load Factor / Referral Count
3/5This popular Robinhood technical screen evaluates your proficiency with directed acyclic graphs by asking you to calculate the total downstream dependencies for every node in a network. Interviewers use this task to assess how well you traverse hierarchical relationships and compute cumulative metrics efficiently. To view the complete prompt, constraints, and professional model solution, a subscription is required.
Coding QuestionsRobinhoodTree 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. ShawTree Diameter
3/5Finding the longest possible distance between any pair of nodes in a hierarchical network is the focus of this graph theory challenge featured in Verkada interviews. You are tasked with analyzing an acyclic connected structure to determine its maximum span, which may not necessarily cross the central vertex. This problem tests your proficiency with recursive graph traversals, tree properties, and path optimization techniques. The complete problem statement, test cases, and a comprehensive model solution are available exclusively with a subscription.
Coding QuestionsVerkadaChain Booking — Max Cascading Reservations
3/5This Airbnb interview question presents a fascinating cascading reservation puzzle where selecting a single starting point triggers a chain reaction of bookings based on spatial radii. Candidates must model the listings as a graph and determine the optimal initial choice that maximizes the total number of activated nodes through recursive propagation. The challenge assesses advanced graph traversal, connectivity, and optimization skills. Unlock the complete problem requirements and the optimal algorithmic solution by subscribing.
Coding QuestionsAirbnbFind the Person Everyone Knows
3/5Given only a pairwise query telling whether one person knows another, find the one person in a group who is known by everyone else and knows no one else, or report that none exists. The task limits how many queries you may make and asks you to reason about relaxed definitions.
Coding QuestionsHubSpotCurrency Arbitrage Detection
3/5This quantitative trading graph problem, featured in an Optiver online assessment, requires detecting currency arbitrage loops from an exchange rate matrix while accounting for transaction fees. The task typically maps to finding negative cycles in log-transformed graphs using specialized shortest-path algorithms. The full problem statement, mathematical reduction details, and complete model solution are available exclusively with a paid subscription.
Coding QuestionsOptiverIs Bipartite Graph
3/5In this graph theory puzzle, frequently asked during technical evaluations at WeRide, you are tasked with verifying whether a collection of interconnected nodes can be cleanly split into two separate partitions without any internal edges. The evaluation checks your fluency in traversal strategies, such as breadth-first or depth-first search, alongside coloring techniques to detect cyclic conflicts. Successfully solving this challenge demonstrates your capability to model relationships and recognize fundamental network topologies. To explore the complete problem description and review a comprehensive model solution, a paid subscription is required.
Coding QuestionsWeRideComputation / Dependency Graph Validation and Pruning
3/5Practice a graph manipulation and validation exercise often featured in technical evaluations at NVIDIA. This challenge assesses your proficiency in managing complex dependency networks, ensuring structural integrity, detecting circular references efficiently, and pruning unnecessary execution branches within deep learning computation graphs. It tests core data structure skills using traversal algorithms and topological sorting to optimize runtime performance. The complete problem statement, edge-case analysis, and fully tested reference implementation require a subscription.
Coding QuestionsNVIDIAGrid Pathfinding with Walk and Jump Cells
3/5A coding question about moving a player across a board where some squares allow single steps, others force two-square leaps, and some are blocked. Decide whether a goal square can be reached and, as a follow-up, how few moves it takes.
Coding QuestionsRobloxReachability in a Time-Indexed Train Schedule
3/5This interview challenge, recently reported at Glean, explores navigation through a timed transit network. Candidates must determine whether a traveler can successfully commute from an origin point to a destination by catching connecting services under strict scheduling constraints. This task evaluates graph traversal techniques and temporal pathfinding abilities. The complete problem statement and optimal programmatic strategy require a subscription to view.
Coding QuestionsGleanMinimum Score of a Path Between Two Cities
3/5This graph theory challenge, reported from Visa technical interviews, requires finding an optimal route across a network of connected locations. Instead of traditional shortest-path metrics, the objective centers on identifying a trajectory where the weakest link or maximum weight encountered along the way is minimized. It tests your proficiency with graph traversal algorithms and data structures like disjoint-set unions or modified search strategies. Gain full access to the complete problem statement and verified code solution with your subscription.
Coding QuestionsVisaMinimize Path Value (Minimax Path)
3/5Finding paths that minimize the maximum edge weight in a network is a classic graph theory problem frequently encountered in Palantir interviews. The goal is to traverse a weighted undirected graph from a starting vertex to a destination while keeping the highest edge stress along the route as low as possible. This challenge tests your familiarity with modified shortest path algorithms and priority queue strategies. Access the complete problem overview and model solution with a subscription.
Coding QuestionsPalantirCourse Schedule (Can Finish All Courses)
3/5Based on a reported Visa interview question, this problem requires you to determine if a set of educational tasks with dependency constraints can all be completed successfully. The core challenge evaluates your understanding of graph theory, specifically cycle detection and topological sorting in directed graphs. You will need to model prerequisites effectively to verify whether a valid execution sequence exists. To view the complete problem statement and optimal model solution, a subscription is required.
Coding QuestionsVisaGraph Coloring (k-Colorability)
3/5This interview challenge, recently featured by WeRide, evaluates your ability to assign colors to vertices in a network such that connected nodes never share the same designation. You will explore combinatorial search strategies and constraint propagation to determine whether a valid coloring scheme exists within a specified limit. Tackling this problem hones your understanding of backtracking and constraint satisfaction techniques. Access to the comprehensive breakdown and optimized solution requires a subscription.
Coding QuestionsWeRideMinimum Link Reallocation to Connect Repositories
3/5Featured in an IBM technical interview, this graph theory problem requires calculating the fewest link reassignments needed to connect a network of isolated or fragmented repositories into a single component. You are given an undirected graph and must strategically relocate edges to achieve full connectivity while minimizing changes. The exercise tests your grasp of graph connectivity, component analysis, and spanning tree concepts. View the complete problem statement and a robust algorithmic solution with a subscription.
Coding QuestionsIBMSix Degrees of Collusion - Fraud Ring Detection
3/5In this graph-traversal coding challenge reported from Stripe interviews, you will investigate interconnected transaction logs to uncover fraudulent rings by tracking shared user identifiers like digital devices and payment cards. The exercise evaluates your capability to construct relational networks, execute transitive queries, and efficiently handle graph components at scale. Unlocking the complete problem text, edge cases, and the reference implementation requires an active subscription.
Coding QuestionsStripeValidate Hamiltonian Path Given a Vertex Sequence
3/5Featured in coding assessments at Codeium, this algorithmic puzzle requires you to verify whether a given sequence of nodes forms a valid Hamiltonian path across a specified undirected graph structure. It evaluates your comprehension of graph connectivity, traversal validation, and combinatorial sequence checking. Unlock the complete problem breakdown, constraints, and optimized model solution with a subscription.
Coding QuestionsCodeiumNumber of Islands (grid connected components)
3/5This classic Samsung interview challenge requires you to determine the total count of distinct connected components formed by adjacent land cells within a two-dimensional binary matrix. You will need to apply graph traversal strategies like depth-first search or breadth-first search to explore and mark visited regions effectively. Access the complete problem breakdown, constraints, and optimal solution by upgrading to a paid subscription.
Coding QuestionsSamsungRank Vehicles for OTA Peer-to-Peer Seeding
3/5Investigate this distributed system design and ranking challenge highlighted in Tesla engineering interviews. The scenario tests your ability to evaluate peer-to-peer contribution histories and prioritize network nodes to minimize expensive cellular data transfers during software rollouts. Candidates must synthesize interaction logs into an effective scoring mechanism for vehicle seeding distribution. Unlock the complete problem description, architectural context, and model solution by upgrading to a paid subscription.
Coding QuestionsTeslaMinimum Selections To Clear Author Grid
4/5A coding question about clearing a grid of labelled items with as few selections as possible, where each selection affects only items with the same label that share its row or column. It asks you to model the effect of one selection and to find the exact minimum under a stated size limit per label.
Coding QuestionsGoldman SachsFill Values in Graph with Conditions
3/5Investigate a graph propagation puzzle featured in QRT interviews that requires updating adjacency matrices based on specific numerical criteria. This task evaluates your capability to utilize priority queues or specialized traversal queues to propagate values across interconnected nodes until equilibrium or condition satisfaction is reached. You will enhance your competency in matrix manipulation and graph state updates. Gain access to the full problem description and professional solution by subscribing.
Coding QuestionsQRTKarat Carpool on Linear Routes
3/5In this Atlassian interview question, you must simulate a scenario where two vehicles start moving simultaneously along connected linear pathways to pick up waiting passengers. The challenge evaluates your graph traversal skills and ability to compute travel durations to determine which vehicle reaches each person first under strict routing constraints. You will need to implement clean logic to handle simultaneous arrivals and route mapping. Unlock the complete problem statement and expert solution by subscribing.
Coding QuestionsAtlassianWord Ladder (Minimum Transformations)
4/5Explore this classic graph-traversal problem frequently featured in technical evaluations at Adobe. The exercise focuses on computing the shortest path between two text strings by modifying a single character at a time through a restricted lexicon. It tests your ability to model state spaces and apply breadth-first search techniques efficiently. Access to the comprehensive problem breakdown and optimal implementation requires a subscription.
Coding QuestionsAdobeFactory 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 QuestionsStripeMaximum 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 SigmaSki 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 QuestionsAirbnbGraph API: Insert/Configure/Validate with Cycle Detection and Structural Constraints
4/5This architectural design challenge, reported from NVIDIA interviews, requires you to build a robust directed dependency management component supporting node creation, bulk configuration, and rigorous validation. Key responsibilities include cycle detection to prevent deadlocks and verifying valid topological execution sequences. It tests your object-oriented design patterns, graph theory fundamentals, and error handling capabilities. Unlock the full implementation details and reference solution with a subscription.
Coding QuestionsNVIDIAWho Rides Which Van
3/5A coding question on matching waiting riders to vans that follow fixed routes on a timed map. Each rider takes the earliest van that reaches them once they are ready and still passes their destination later on its route.
Coding QuestionsWhatnotSeat Every Couple Together with the Fewest Swaps
4/5A coding question on a row of seated people made up of numbered couples, asking for the fewest exchanges of seats needed so that every couple ends up in one of the side-by-side seat pairs.
Coding QuestionsPalo Alto NetworksOne Walk Over Every Trail
3/5A coding question on a park map of trails between attractions: after keeping only the trails between chosen attractions, decide whether one continuous walk can cover each of them exactly once.
Coding QuestionsWhatnotCan All Courses Be Completed?
3/5A graph question about whether a set of dependency pairs between numbered tasks admits any valid ordering. It checks how directed relations are modelled and how loops in them are detected.
Coding QuestionsJPMorganValidate a Forest from (parent, child) Edges
3/5A graph question about deciding whether a set of directed parent-child edges describes valid, separate rooted trees. It covers how to reject nodes with several parents and loops, and how to handle isolated nodes and very deep inputs.
Coding QuestionsWaymoCount Connected Land Regions in a Grid
3/5A grid question about counting separate connected groups of cells, where adjacency is edge-sharing only. It also tests safe traversal of large inputs and leaving the input untouched.
Coding QuestionsOracleCar Maze with Incrementally Revealed Neighbors (DFS)
2/5A coding question on searching a graph whose connections are only discovered as positions are visited. It checks cycle handling, path reconstruction and the edge cases of an unreachable or already-reached goal.
Coding QuestionsWaymoShortest Distance Between Two Pins via Shared Boards
3/5A graph question about measuring how closely two items are related when items are grouped into collections. It tests modelling grouped data as a graph and handling unreachable and degenerate inputs.
Coding QuestionsPinterestShortest Path from Source to Target Nodes (Dijkstra)
3/5A graph question on finding cheapest routes in a weighted directed network. You compute the minimum cost from one starting point to every place that can be reached, using non-negative link costs.
Coding QuestionsWaymoRobbing 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 QuestionsZipChess Piece Shortest Path on a Fixed Board
3/5A coding question about finding the fewest jumps a chess piece needs between two squares of a rectangular board, including boards with forbidden squares and custom piece movements. It tests how well you model a board as a graph and reason about shortest paths and unreachable cases.
Coding QuestionsWaymoFriend Recommendation
3/5A social-network feature built on a small user model: decide which suggestions are allowed, pick some at random, and rank the rest by how many friends they share with the user. It tests careful handling of collections and edge cases such as asking for more results than exist.
Coding QuestionsMetaCount Land Regions in a Grid
3/5A coding question on a grid of land and water cells: count the separate landmasses when only horizontal and vertical neighbours join. It checks comfort with traversing a matrix, tracking visited cells and handling empty or single-cell inputs.
Coding QuestionsBridgewaterWord Transformation Path with One- or Two-Character Moves
4/5A coding question on moving from one word to another through a dictionary, where every step may alter one or two letters at once. The goal is to decide whether the target can be reached at all.
Coding QuestionsRedditMinimum Road Score on a Trip Between Two Cities
3/5A coding question about a network of cities joined by weighted two-way roads. Paths may reuse roads and cities, and you find the lowest road weight that any trip between the two end cities can be forced to include.
Coding QuestionsVisa
Studied alongside
Graph interview FAQ
- How many Graph interview questions are there?
- 198 reported questions, mostly Coding Questions.
- Which companies ask Graph questions?
- Amazon (21), Google (20), Uber (14), Microsoft (7), Apple (7), Snowflake (7), OpenAI (6), ByteDance (6).
- How hard are Graph questions?
- They average 3.1 out of 5: 12 at 2/5, 153 at 3/5, 33 at 4/5.