Glean Coding Interview Questions
25 Glean coding interview problems with full optimal solutions — 8 easy, 12 medium, 5 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Glean interviewer values, and a FAQ section.
Showing 7 problems of 25
- #15mediumfrequently asked
15. 3Sum
Glean uses 3Sum to evaluate whether candidates can reduce a naive O(n³) problem to O(n²) by sorting and applying two pointers — the same space-time reasoning that shows up in multi-term query intersection optimization.
- #49mediumfrequently asked
49. Group Anagrams
Glean asks this because normalizing and bucketing strings by a canonical key is the foundation of term-normalization in search indexing — the same logic that maps 'ran', 'nar', and 'arn' to a single canonical form for retrieval.
- #56mediumfrequently asked
56. Merge Intervals
Glean uses this to assess interval-sweep reasoning — the same logic behind merging overlapping document time-ranges in activity timelines, or collapsing overlapping token spans in entity recognition post-processing.
- #200mediumfrequently asked
200. Number of Islands
Glean uses this to probe graph traversal fluency — BFS and DFS over a 2D grid mirror the connected-component analysis used in clustering semantically related documents into topic islands.
- #207mediumfrequently asked
207. Course Schedule
Glean tests cycle detection in directed graphs here — the same topological ordering problem that arises in dependency resolution when indexing hierarchically structured enterprise knowledge bases.
- #238mediumfrequently asked
238. Product of Array Except Self
Glean tests prefix/suffix product reasoning here — the same divide-and-accumulate pattern used in precomputing cumulative document scores across a corpus segment without redundant recalculation.
- #322mediumfrequently asked
322. Coin Change
Glean uses Coin Change to assess unbounded-knapsack DP thinking — a pattern directly analogous to finding the minimum number of query re-expansions needed to cover a target relevance budget.