Slack Coding Interview Questions
20 Slack coding interview problems with full optimal solutions — 20 easy, 0 medium, 0 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Slack interviewer values, and a FAQ section.
- #1easyfoundational
1. Two Sum
Given an array of integers, return indices of two numbers adding up to a target.
- #2easyfoundational
2. Valid Parentheses
Given a string of brackets, decide whether they are balanced.
- #3easyfoundational
3. Merge Two Sorted Lists
Merge two sorted singly linked lists into one sorted list.
- #4easyfoundational
4. Remove Duplicates from Sorted Array
In-place dedupe a sorted array and return the new length.
- #5easyfoundational
5. Remove Element
Remove all occurrences of val from an array in place and return the new length.
- #6easyfoundational
6. Search Insert Position
Find the index where a target should be inserted in a sorted array.
- #7easyfoundational
7. Plus One
Add one to a non-negative integer represented as a digit array.
- #8easyfoundational
8. Merge Sorted Array
Merge nums2 into nums1 in-place as one sorted array.
- #9easyfoundational
9. Binary Tree Inorder Traversal
Return the inorder traversal of a binary tree's values.
- #10easyfoundational
10. Same Tree
Determine if two binary trees are identical in structure and value.
- #11easyfoundational
11. Symmetric Tree
Check whether a binary tree is a mirror of itself.
- #12easyfoundational
12. Maximum Depth of Binary Tree
Return the depth of the deepest leaf in a binary tree.
- #13easyfoundational
13. Balanced Binary Tree
Decide whether a binary tree is height-balanced.
- #14easyfoundational
14. Minimum Depth of Binary Tree
Find the depth of the nearest leaf in a binary tree.
- #15easyfoundational
15. Pascal's Triangle
Return the first numRows of Pascal's triangle.
- #16easyfoundational
16. Best Time to Buy and Sell Stock
Maximize a single buy/sell profit from a daily price array.
- #17easyfoundational
17. Valid Palindrome
Decide whether a string is an alphanumeric palindrome (case-insensitive).
- #18easyfoundational
18. Single Number
Find the single number in an array where every other number appears twice.
- #19easyfoundational
19. Linked List Cycle
Determine whether a singly linked list contains a cycle.
- #20easyfoundational
20. Min Stack
Design a stack with constant-time minimum lookup.