← 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 · Easy

Balanced Brackets

Supported standard problem · Match confidence: high

IMC · Topic guidanceOptiver · Topic guidanceHudson River Trading · Topic guidance
About this question’s source match

The title and Programming / Other classification fit the linked public problem. This entry uses an independently worded practice statement and original implementation. The public title and category identify a standard problem family; the private Trading Interview statement has not been inspected.

Implement solve(s), returning whether every bracket in s closes a matching opener in correctly nested order. Only (), [] and {} appear; the empty string is balanced.

Assumptions and constraints

  • Only bracket characters are supplied.
  • 0 <= len(s) <= 100000

Examples

s="{[()]}"
→ true

Each inner pair closes before its containing pair.

Company preparation relevance

These links connect this exercise to companies’ public examples or stated interview topics. They do not establish that a company asked this exact Learnr question.

  • IMC

    Official topic guidance

    Topic overlap: bracket validation “Balanced Brackets”, expression-stack evaluation “Evaluate RPN” and word-frequency “Word Frequency” practice basic programming, code reasoning and communication discussed in the first-party engineering assessment article.

    A unique approach to hiring — Alex ten Brink ↗
    Evidence scope and uncertainty

    Engineering account focused on India, describing rollout in India and Amsterdam. It is a historical account, not a universal current interview format.

    These are Learnr-authored exercises selected for topic overlap. The company does not name these catalogue titles or verify that these exact questions were asked.

  • Optiver

    Official topic guidance

    Topic overlap: stacks/bracket nesting “Balanced Brackets”, pointer identity/cycles “Linked List Cycle”, and heap operations “Priority Queue Using Heaps” exercise collection types, data structures and implementation understanding recommended by Optiver.

    Optiver interview tips for Software Engineers ↗
    Evidence scope and uncertainty

    Official software engineering guidance dated 21 March 2025; no trading-test format or cutoff inferred.

    These are Learnr-authored exercises selected for topic overlap. The company does not name these catalogue titles or verify that these exact questions were asked.

  • Hudson River Trading

    Official topic guidance

    Topic overlap: bracket stacks “Balanced Brackets”, expression evaluation “Evaluate RPN” and heap implementation “Priority Queue Using Heaps” exercise practical programming fundamentals, edge-case debugging and explanation, consistent with the author’s description of engineering interviews.

    Engineering and Interviewing at HRT — Joe Smith ↗
    Evidence scope and uncertainty

    Engineering-only article dated 2 October 2025. It explicitly favors fundamentals over sudden-insight tricks; these practice choices do not imply a memorized-question bank.

    These are Learnr-authored exercises selected for topic overlap. The company does not name these catalogue titles or verify that these exact questions were asked.

References

Read the supporting material without leaving your question.

  • leetcode.com

    Valid Parentheses — 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.