Grammarly Interview Questions — 27 DSA Problems
26 problems with full solutions in Python, Java, C++, JavaScript, Go, Rust.
Most frequently asked Grammarly LeetCode questions for software engineering interviews.
- Merge Intervals (MEDIUM) — Array, Sorting
- Remove All Adjacent Duplicates In String (EASY) — String, Stack
- Remove All Adjacent Duplicates in String II (MEDIUM) — String, Stack
- Insert Delete GetRandom O(1) (MEDIUM) — Array, Hash Table, Math, Design, Randomized
- Generate Parentheses (MEDIUM) — String, Dynamic Programming, Backtracking
- Repeated DNA Sequences (MEDIUM) — Hash Table, String, Bit Manipulation, Sliding Window, Rolling Hash, Hash Function
- Vowel Spellchecker (MEDIUM) — Array, Hash Table, String
- Search in Rotated Sorted Array (MEDIUM) — Array, Binary Search
- Perfect Number (EASY) — Math
- Climbing Stairs (EASY) — Math, Dynamic Programming, Memoization
- Sqrt(x) (EASY) — Math, Binary Search
- Number of Islands (MEDIUM) — Array, Depth-First Search, Breadth-First Search, Union Find, Matrix
- Word Search (MEDIUM) — Array, String, Backtracking, Depth-First Search, Matrix
- Backspace String Compare (EASY) — Two Pointers, String, Stack, Simulation
- Word Break II (HARD) — Array, Hash Table, String, Dynamic Programming, Backtracking, Trie, Memoization
- Implement Trie (Prefix Tree) (MEDIUM) — Hash Table, String, Design, Trie
- Word Break (MEDIUM) — Array, Hash Table, String, Dynamic Programming, Trie, Memoization
- Logger Rate Limiter (EASY) — Hash Table, Design, Data Stream
- Special Binary String (HARD) — String, Recursion
- Decode the Slanted Ciphertext (MEDIUM) — String, Simulation
- Evaluate Reverse Polish Notation (MEDIUM) — Array, Math, Stack
- Sum of Left Leaves (EASY) — Tree, Depth-First Search, Breadth-First Search, Binary Tree
- Set Mismatch (EASY) — Array, Hash Table, Bit Manipulation, Sorting
- Maximum Palindromes After Operations (MEDIUM) — Array, Hash Table, String, Greedy, Sorting, Counting
- Clone Graph (MEDIUM) — Hash Table, Depth-First Search, Breadth-First Search, Graph
- Trapping Rain Water (HARD) — Array, Two Pointers, Dynamic Programming, Stack, Monotonic Stack
- Unique Paths (MEDIUM) — Math, Dynamic Programming, Combinatorics
G
Grammarly
27 questions tracked26 with solutions
Frequency scoreSorted highest → lowest frequency✓ Our Solution = we have a detailed walkthrough
Showing 27 of 27 questions
4ArrayHash TableMathDesign+1
5StringDynamic ProgrammingBacktracking
6Hash TableStringBit ManipulationSliding Window+2
10MathDynamic ProgrammingMemoization
12ArrayDepth-First SearchBreadth-First SearchUnion Find+1
13ArrayStringBacktrackingDepth-First Search+1
14Two PointersStringStackSimulation
15ArrayHash TableStringDynamic Programming+3
16Hash TableStringDesignTrie
17ArrayHash TableStringDynamic Programming+2
18EasyLogger Rate Limiter
Hash TableDesignData Stream
22TreeDepth-First SearchBreadth-First SearchBinary Tree
23ArrayHash TableBit ManipulationSorting
24ArrayHash TableStringGreedy+2
25Hash TableDepth-First SearchBreadth-First SearchGraph
26ArrayTwo PointersDynamic ProgrammingStack+1
27MathDynamic ProgrammingCombinatorics