Glassdoor Coding Interview Questions
26 Glassdoor coding interview problems with full optimal solutions — 17 easy, 7 medium, 2 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Glassdoor interviewer values, and a FAQ section.
Showing 26 problems of 26
- #15mediumfoundational
15. Group Anagrams
Glassdoor's review-tagging pipeline buckets free-text snippets by shared character sets — this hash-map grouping problem is their go-to check for candidates who can think beyond brute enumeration when categorizing unstructured text at scale.
- #16mediumfoundational
16. Top K Frequent Elements
Surfacing the highest-rated companies out of millions of reviews is Glassdoor's bread and butter — this heap-based top-K problem tests whether you can rank by frequency without sorting everything first.
- #17mediumfoundational
17. Merge Intervals
Glassdoor's salary-range bands overlap across job titles and geographies — merging those intervals cleanly is a real backend task, which is why this sort-and-sweep problem shows up regularly in their coding screens.
- #18mediumfoundational
18. Longest Substring Without Repeating Characters
Extracting the longest unique-word run from a review snippet is analogous to what Glassdoor's NLP team does daily — this sliding-window problem tests whether you can maintain a dynamic window without backtracking on every character.
- #19mediumfoundational
19. Course Schedule
Glassdoor models skill prerequisites and career-path dependencies as directed graphs — cycle detection via topological sort is the pattern they reach for when verifying those graphs are actually traversable.
- #20mediumfoundational
20. Coin Change
Glassdoor's review-scoring system aggregates weighted signals — thinking about optimal sub-amounts before building the full aggregate maps directly onto this classic DP problem they use to filter for candidates who can construct bottom-up solutions.
- #21mediumfoundational
21. Product of Array Except Self
Glassdoor's salary-normalization pipeline needs per-element context built from all other values — this prefix-suffix product pattern is their benchmark for candidates who can think about array transformations without touching division.
- #22hardfoundational
22. Merge K Sorted Lists
Glassdoor's feed merges sorted review streams from multiple data sources in real time — this k-way merge problem is their hard-tier benchmark for candidates who know when to reach for a min-heap instead of naive repeated comparisons.
- #23hardfoundational
23. Median of Two Sorted Arrays
Glassdoor publishes salary medians from two independently sorted data warehouses — getting that number in O(log n) time, not O(n), is the kind of constraint engineers there live with, which is why this binary-search-on-partitions problem appears in their hard-tier loops.
- #24easyfoundational
24. Best Time to Buy and Sell Stock
Glassdoor coaches job-seekers on offer timing — and this single-pass min-tracking problem is their go-to warmup that doubles as a filter for candidates who conflate 'track the minimum seen' with 'compare all pairs'.
- #25easyfoundational
25. Contains Duplicate
Deduplicating reviews before they're stored is one of Glassdoor's first data-quality gates — this Set-based duplicate-detection problem is their simplest warmup and a signal that you know O(n) beats sort-based O(n log n).
- #26easyfoundational
26. Valid Anagram
Glassdoor's search team normalizes job-title keywords so that 'Engineer Software' and 'Software Engineer' hit the same results — this character-frequency comparison is the pattern behind that normalization and a common screen opener.
- #1easyfoundational
1. Two Sum
Find two indices in an array whose values sum to a target — Glassdoor uses this to test whether you can replace an O(n^2) scan with a hash-lookup.
- #2easyfoundational
2. Valid Parentheses
Validate a string of brackets using a stack — Glassdoor uses this as a warm-up to gauge basic data-structure fluency.
- #3easyfoundational
3. Merge Two Sorted Lists
Merge two sorted linked lists into one sorted list — Glassdoor uses this to test pointer hygiene under interleaved inputs.
- #4easyfoundational
4. Remove Duplicates from Sorted Array
Dedupe a sorted array in place — Glassdoor uses this to test two-pointer reasoning on the kind of stream they dedupe in salary reports.
- #5easyfoundational
5. Remove Element
Remove all instances of a value in place — Glassdoor uses this to confirm you can think about partition pointers without a temp array.
- #6easyfoundational
6. Search Insert Position
Find the index where a target should be inserted in a sorted array — Glassdoor uses this to grade binary-search precision under boundary conditions.
- #7easyfoundational
7. Plus One
Increment a digit array by one — Glassdoor uses this to grade carry-handling cleanliness and how you deal with the leading-digit edge case.
- #8easyfoundational
8. Merge Sorted Array
Merge nums2 into nums1 in place — Glassdoor uses this to test reverse-pointer thinking on a problem with hidden cleverness.
- #9easyfoundational
9. Binary Tree Inorder Traversal
Return the inorder traversal of a binary tree — Glassdoor uses this to gauge tree recursion fluency, then probes the iterative version.
- #10easyfoundational
10. Same Tree
Determine whether two binary trees are identical in shape and values — Glassdoor uses this to grade recursive base-case discipline.
- #11easyfoundational
11. Symmetric Tree
Check if a binary tree is a mirror of itself — Glassdoor uses this to test paired-recursion reasoning.
- #12easyfoundational
12. Maximum Depth of Binary Tree
Return the maximum depth of a binary tree — Glassdoor uses this as a quick warm-up to grade your recursion height intuition.
- #13easyfoundational
13. Balanced Binary Tree
Return whether a binary tree is height-balanced — Glassdoor uses this to test whether you can fold height + balance into one O(n) post-order traversal.
- #14easyfoundational
14. Minimum Depth of Binary Tree
Find the shortest path from root to any leaf — Glassdoor uses this to grade whether you correctly handle one-sided trees (often missed).