Problems
Callback's own problems and the LeetCode questions companies have been asking, in one place — filter by category, company, topic, difficulty, and how recently a question showed up.
Solve on Callback
34 problems asked at Pinterest — full prompts you can work right here.
Max Width
Algorithms & Data Structures · Greedy line packing and fiddly space math — full text justification.
Round Numeric String Values
Algorithms & Data Structures · Arbitrary-precision rounding — floats need not apply.
Violation Log Analyzer
Algorithms & Data Structures · Streaming design: recent counts, top-k, and sliding-window bans.
Nested Set Equality
Algorithms & Data Structures · Order and duplicates vanish at every depth — canonicalize.
Assign Pins to Shortest Columns
Algorithms & Data Structures · The masonry-layout greedy: shortest column wins, leftmost on ties.
Collect Pins from Reachable Boards
Algorithms & Data Structures · BFS over the bipartite pin-board graph without building board-to-board edges.
Stream Line Reader
Algorithms & Data Structures · Reassemble lines from arbitrary chunks, then settle the balances they carry.
Escape-Room Leaderboard
Algorithms & Data Structures · Best-time standings with live ranks — the data-structure trade-off talk.
Rebalance Experiment Buckets with Minimal Reassignment
Algorithms & Data Structures · Meet new group sizes while disrupting as few buckets as possible.
List Unallocated Experiment Buckets
Algorithms & Data Structures · Interval sweep for the free ranges — independent of bucket-space size.
Design a Smallest-Free ID Allocator
Algorithms & Data Structures · Smallest-free allocation under a capacity that moves at runtime.
Cross-Reference Logs to Flag Spam Numbers
Algorithms & Data Structures · A hash join across two logs — and saying that word out loud.
Sparse Matrix Storage, Addition, and Multiplication
Algorithms & Data Structures · Storage proportional to nonzeros — and the cancellation trap.
Select the Nearest Eligible Elevator
Algorithms & Data Structures · A requirements-gathering problem wearing a simulation costume.
Decide Target via Subsequence Plus/Multiply Expression
Algorithms & Data Structures · Expression search with precedence — the (total, pending product) trick.
Compute Reachable Cells for a Cleaning Robot
Algorithms & Data Structures · Slide-until-blocked physics: rest positions are the states, not cells.
Maximize Boxes Stored Through One Entrance
Algorithms & Data Structures · Prefix-min ceilings plus an exchange-argument greedy.
Mark and Compact a Heap-Indexed Subtree
Algorithms & Data Structures · Garbage collection in miniature: mark a subtree, compact, remap.
Build Tabs
Frontend · One active index drives the whole component.
Design Adjustable ID Allocator
Algorithms & Data Structures · Pack named ID ranges, then resize with all-or-nothing shifts.
Settle Debts
Algorithms & Data Structures · Net the balances, then match debtors to creditors greedily.
Reconstruct Itinerary
Algorithms & Data Structures · Hierholzer's walk, plus the loop question that fails candidates.
Access-Log Query System
Algorithms & Data Structures · Two sorted indexes and a binary search you write by hand.
Bus Routes: Minimum Transfers
Algorithms & Data Structures · BFS over routes, not stops — clear each stop as you expand it.
Board Reachability with Exact Jumps
Algorithms & Data Structures · Two out-edges per index; BFS answers both parts in one pass.
Restaurant Seating: Free Intervals
Algorithms & Data Structures · A +ppl/−ppl sweep; occupancy is constant between events.
Count Pins on a Two-Column Screen
Algorithms & Data Structures · Only n scroll offsets matter — slide the window to a pin's top.
Count Subarrays with Score Below K
Algorithms & Data Structures · Positives make sum × length monotone — a two-pointer window.
Count Objects in a Pixel Grid via an API
Algorithms & Data Structures · Flood fill through an opaque API — isSameObject is the catch.
Roads with Switches
Algorithms & Data Structures · Open roads cost 0, closed cost 1 — textbook 0-1 BFS.
Bank Tellers: Wait Time
Algorithms & Data Structures · A min-heap simulation, then binary search on the answer.
First Word Containing a Prefix
Algorithms & Data Structures · lower_bound on the prefix itself — the follow-ups are the round.
Stateful Search Autocomplete Session
Algorithms & Data Structures · LC 642: a typing session over historical search frequencies.
Reverse Count-and-Say
Algorithms & Data Structures · Parse (count, digit) pairs backward — adjacent runs must differ.
Asked on LeetCode
45 questions at Pinterest · all time
- Reconstruct ItineraryhardArrayStringDepth-First SearchGraph Theory+5frequency 100.0
- Optimal Account BalancinghardArrayDynamic ProgrammingBacktrackingBit Manipulation+1frequency 96.5
- Bus RouteshardArrayHash TableBreadth-First Searchfrequency 94.1
- Expression Add OperatorshardMathStringBacktrackingfrequency 90.2
- Shortest Way to Form StringmediumTwo PointersStringBinary SearchGreedyfrequency 81.7
- Shortest Path in a Grid with Obstacles EliminationhardArrayBreadth-First SearchMatrixfrequency 79.0
- Coin ChangemediumArrayDynamic ProgrammingBreadth-First SearchKnapsack Problem+1frequency 77.0
- Count Subarrays With Score Less Than KhardArrayBinary SearchSliding WindowPrefix Sumfrequency 77.0
- Count and SaymediumStringfrequency 69.2
- Design Search Autocomplete SystemhardStringDepth-First SearchDesignTrie+3frequency 69.2
- Is SubsequenceeasyTwo PointersStringDynamic Programmingfrequency 67.6
- Maximum Profit in Job SchedulinghardArrayBinary SearchDynamic ProgrammingSortingfrequency 67.6
- Split Array Largest SumhardArrayBinary SearchDynamic ProgrammingGreedy+1frequency 67.6
- Find Median from Data StreamhardTwo PointersDesignSortingHeap (Priority Queue)+1frequency 65.8
- Longest Word in DictionarymediumArrayHash TableStringTrie+1frequency 63.8
- Target SummediumArrayDynamic ProgrammingBacktrackingKnapsack Problem+1frequency 63.8
- Find Median Given Frequency of NumbershardDatabasefrequency 61.5
- Meeting Rooms IIIhardArrayHash TableSortingHeap (Priority Queue)+1frequency 61.5
- Delete Nodes And Return ForestmediumArrayHash TableTreeDepth-First Search+1frequency 59.0
- Design A LeaderboardmediumHash TableDesignSortingfrequency 56.0
- Put Boxes Into the Warehouse ImediumArrayGreedySortingfrequency 56.0
- Put Boxes Into the Warehouse IImediumArrayGreedySortingfrequency 56.0
- Sparse Matrix MultiplicationmediumArrayHash TableMatrixLinear Algebrafrequency 56.0
- Find Minimum Time to Finish All JobshardArrayDynamic ProgrammingBacktrackingBit Manipulation+1frequency 52.5
- Multiply StringsmediumMathStringSimulationfrequency 52.5
- Reorganize StringmediumHash TableStringGreedySorting+2frequency 48.3
- Accounts MergemediumArrayHash TableStringDepth-First Search+3frequency 42.8
- Candy CrushmediumArrayTwo PointersMatrixSimulationfrequency 42.8
- Combination SummediumArrayBacktrackingfrequency 42.8
- Dot Product of Two Sparse VectorsmediumArrayHash TableTwo PointersDesign+1frequency 42.8
- Letter Combinations of a Phone NumbermediumHash TableStringBacktrackingfrequency 42.8
- String CompressionmediumTwo PointersStringfrequency 42.8
- Text JustificationhardArrayStringSimulationfrequency 42.8
- Add Two Numbers IImediumLinked ListMathStackfrequency 35.2
- Corporate Flight BookingsmediumArrayPrefix Sumfrequency 35.2
- Employee Free TimehardArraySweep LineSortingHeap (Priority Queue)frequency 35.2
- Find First and Last Position of Element in Sorted ArraymediumArrayBinary Searchfrequency 35.2
- Meeting Rooms IImediumArrayTwo PointersGreedySorting+2frequency 35.2
- Merge IntervalsmediumArraySortingQuicksortfrequency 35.2
- Merge k Sorted ListshardLinked ListDivide and ConquerHeap (Priority Queue)Merge Sort+1frequency 35.2
- Number of IslandsmediumArrayDepth-First SearchBreadth-First SearchUnion-Find+1frequency 35.2
- Number of ProvincesmediumDepth-First SearchBreadth-First SearchUnion-FindGraph Theoryfrequency 35.2
- Rotting OrangesmediumArrayBreadth-First SearchMatrixfrequency 35.2
- The MazemediumArrayDepth-First SearchBreadth-First SearchMatrixfrequency 35.2
- Top K Frequent ElementsmediumArrayHash TableDivide and ConquerSorting+4frequency 35.2
Listings only — titles, difficulty, and tags link out to LeetCode. Imported from the leetcode-company-wise-problems snapshot dated 1 June 2025. Frequency is that dataset's own relative score within a company and time range.