Skip to main content

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 17 problems of 26

  • #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.

  • #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.

  • #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.

  • #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.

Glassdoor Coding Interview Questions — Full Solutions — InterviewChamp.AI