← Quant playground

Free practice library

Interview practice

Solve complete questions with progressive hints, worked solutions and Python implementations. Each question explains its assumptions and source match. Original interpretations are labelled explicitly.

752

Ready to practise

174

Not yet playable

926

Catalogue titles

Public standard problems and original exercises; hidden Trading Interview questions have not been verified.

174 titles have been investigated but remain unresolved. Their missing details are recorded without adding substitute exercises. Every playable question has a guided animated answer; selected questions also have custom diagrams.

Practise Learnr’s own questions →Follow a role-specific curriculum →

752 matching entries · page 1 of 16

Programming · Hard

Find All Paths

Supported standard problem · Match confidence: medium

Company use unverified
About this question’s source match

The title and Programming / Graphs classification fit the linked public problem. This entry uses an independently worded practice statement and original implementation. The title does not specify endpoints or whether cycles exist. The linked standard DAG problem is a sensible graph-category interpretation; these assumptions are explicit.

Implement solve(graph) returning every directed path from node 0 to node n-1 in a directed acyclic graph. graph[u] lists outgoing neighbor labels. Preserve input neighbor order in the returned depth-first path order.

Assumptions and constraints

  • n >= 1; graph is acyclic.
  • No repeated edges; labels are 0 through n-1.
  • 1 <= n <= 15

Examples

graph=[[1,2],[3],[3],[]]
→ [
  [
    0,
    1,
    3
  ],
  [
    0,
    2,
    3
  ]
]

The two branches from 0 both reach node 3.

Company evidence · unverified

No company-specific source has been matched to this exercise. Its references support the topic or solution method; they do not establish employer use.

References

Read the supporting material without leaving your question.

  • leetcode.com

    All Paths From Source To Target — LeetCode

    Public problem definition only; Learnr examples, boundary extensions, solution explanation and implementation are independently authored. Does not establish the private catalogue statement.

Catalogue metadata captured 2026-10-12. Metadata source.