All company sheets
GitLab DSA interview questions
52 problems to practise before your GitLab online test or coding round. Most widely asked first.
52
Questions
5
Easy
41
Medium
6
Hard
Commonly reported. Problems candidates often report from this company’s coding rounds. These are Astra’s own tags, not an official question list.
GitLab is hiring · 15 open roles on Astra right nowView roles52 questions
- 1
Contains Duplicate
EasyArrayTagged at 7 companies - 2
Find the Diameter of a Binary Tree
EasyRecursionTagged at 7 companies - 3
Chat Filter Symmetry Check
EasyTwo PointersTagged at 7 companies - 4
Remove Element
EasyTwo PointersTagged at 7 companies - 5
Find All Subsets (Power Set) of a Set
MediumRecursionTagged at 7 companies - 6
Find the Number of Islands in a Grid
MediumRecursionTagged at 7 companies - 7
Generate All Unique Binary Search Trees II
MediumRecursionTagged at 7 companies - 8
Restore All Valid IP Addresses from a String
MediumRecursionTagged at 7 companies - 9
Sort a Stack Using Only Recursion
MediumRecursionTagged at 7 companies - 10
Search a 2D Matrix II (Rows and Columns Sorted)
MediumBinary SearchTagged at 7 companies - 11
Find Successful Pairs of Spells and Potions
MediumBinary SearchTagged at 7 companies - 12
Find the Right Interval for a Set of Intervals
MediumBinary SearchTagged at 7 companies - 13
Find Product of Array Elements Except Self
MediumArrayTagged at 7 companies - 14
Find All Unique Triplets That Sum to Zero (3Sum)
MediumArrayTagged at 7 companies - 15
Find the Duplicate Number (O(1) Space)
MediumArrayTagged at 7 companies - 16
Find the Longest Subarray with Sum Divisible by K
MediumArrayTagged at 7 companies - 17
Find Intersections of Two Interval Lists
MediumArrayTagged at 7 companies - 18
Solve the House Robber Problem (DP)
MediumArrayTagged at 7 companies - 19
Defragmentation Algorithm Storage
MediumSliding WindowTagged at 7 companies - 20
Grumpy Bookstore Owner
MediumSliding WindowTagged at 7 companies - 21
Delete a Node in a Doubly Linked List
EasyLinkedListTagged at 6 companies - 22
Minimum Path Sum in Grid
MediumDPTagged at 6 companies - 23
Find Wait Days for Warmer Daily Temperatures
MediumStack and QueueTagged at 6 companies - 24
Find if a 132 Pattern Exists in an Array
MediumStack and QueueTagged at 6 companies - 25
Validate Stack Sequences with Push and Pop Operations
MediumStack and QueueTagged at 6 companies - 26
Minimum Add to Make Parentheses Valid
MediumStack and QueueTagged at 6 companies - 27
Calculate the Sum of All Subarray Ranges
MediumStack and QueueTagged at 6 companies - 28
Find the Starting Node of a Linked List Cycle
MediumLinkedListTagged at 6 companies - 29
Add Two Numbers II (Digits in Forward Order)
MediumLinkedListTagged at 6 companies - 30
Swap Kth Node from Beginning and Kth Node from End
MediumLinkedListTagged at 6 companies - 31
Find the Duplicate Number in an Array (Cycle Detection Method)
MediumLinkedListTagged at 6 companies - 32
Merge Sort for a Doubly Linked List
MediumLinkedListTagged at 6 companies - 33
Delete a Node from a Circular Linked List
MediumLinkedListTagged at 6 companies - 34
Implement a Binary Tree Zigzag Level Order Traversal
MediumTreeTagged at 6 companies - 35
Count Good Nodes in a Binary Tree (Amazon)
MediumTreeTagged at 6 companies - 36
Convert a Binary Search Tree to a Sorted Circular Doubly Linked List
MediumTreeTagged at 6 companies - 37
Find All Duplicate Subtrees in a Binary Tree
MediumTreeTagged at 6 companies - 38
Find Longest Substring Without Repeating Characters
MediumStringTagged at 6 companies - 39
Find the Index of the First Occurrence (strStr)
MediumStringTagged at 6 companies - 40
Check if String is a Valid Palindrome After One Deletion
MediumStringTagged at 6 companies - 41
Airbnb Booking Calendar Overlap
MediumIntervalsTagged at 6 companies - 42
Web Crawler URL Parser
MediumDynamic ProgrammingTagged at 6 companies - 43
Minimum Height Trees
MediumGraphTagged at 5 companies - 44
Cycle in Undirected Graph (BFS)
MediumGraphTagged at 5 companies - 45
Number of Ways to Arrive at Destination
MediumGraphTagged at 5 companies - 46
Rotting Oranges (BFS Multi-Source)
MediumGraphTagged at 5 companies - 47
Merge k Sorted Linked Lists
HardLinkedListTagged at 5 companies - 48
Implement the Knuth-Morris-Pratt (KMP) Prefix Function (LPS)
HardStringTagged at 5 companies - 49
Implement the Rabin-Karp String Matching Algorithm
HardStringTagged at 5 companies - 50
Interleaving String
HardDPTagged at 4 companies - 51
Articulation Points (Tarjan’s Algorithm)
HardGraphTagged at 3 companies - 52
Strongly Connected Components (Kosaraju’s Algorithm)
HardGraphTagged at 3 companies