Squarespace Coding Interview Questions
25 Squarespace coding interview problems with full optimal solutions — 12 easy, 10 medium, 3 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Squarespace interviewer values, and a FAQ section.
- #1easyfoundational
1. Two Sum
Find two indices whose values sum to a target; Squarespace uses it as a phone-screen warm-up to gauge JS hash-map fluency.
- #2easyfoundational
2. Valid Parentheses
Validate that brackets in a string are balanced; Squarespace screens use it to test stack reasoning relevant to nested template blocks.
- #3easyfoundational
3. Merge Two Sorted Lists
Merge two sorted linked lists into one; Squarespace uses it to verify pointer hygiene with dummy heads.
- #4easyfoundational
4. Remove Duplicates from Sorted Array
Dedup in-place on a sorted array and return the new length; Squarespace uses it to test two-pointer fluency.
- #5easyfoundational
5. Remove Element
Remove all occurrences of a value in-place; Squarespace screens use it to test in-place mutation discipline.
- #6easyfoundational
6. Search Insert Position
Find the index where a target should be inserted into a sorted array; Squarespace uses it to test bounded binary-search.
- #7easyfoundational
7. Best Time to Buy and Sell Stock
Compute the maximum single-trade profit in a price series; Squarespace uses it to probe whether you reach for a one-pass min-tracker before reaching for nested loops.
- #8easyfoundational
8. Single Number
Find the one element that appears once when every other element appears twice; Squarespace uses it to test whether you reach for XOR over a hash set.
- #9easyfoundational
9. Linked List Cycle
Detect whether a singly linked list contains a cycle; Squarespace uses it to gauge whether you know Floyd's two-pointer technique versus building a visited set.
- #10easyfoundational
10. Reverse Linked List
Reverse a singly linked list in place; Squarespace uses it as a fundamentals check before harder block-ordering problems.
- #11easyfoundational
11. Maximum Depth of Binary Tree
Return the longest root-to-leaf path length of a binary tree; Squarespace uses it to check whether you reach for a clean recursion or unnecessary state.
- #12easyfoundational
12. Valid Palindrome
Decide whether a string is a palindrome after stripping non-alphanumeric characters and lowercasing; Squarespace uses it to gauge two-pointer fluency on cleaned input.
- #13mediumfoundational
13. Longest Substring Without Repeating Characters
Find the length of the longest substring of distinct characters; Squarespace uses it to test the sliding-window pattern.
- #14mediumfoundational
14. Add Two Numbers
Add two non-negative integers represented as reversed linked lists and return the sum as a linked list; Squarespace uses it to test careful carry handling on a list scan.
- #15mediumfoundational
15. Container With Most Water
Find the pair of vertical lines that hold the most water; Squarespace uses it to test whether you reach for the two-pointer optimization instead of brute force.
- #16mediumfoundational
16. 3Sum
Find every unique triplet that sums to zero; Squarespace uses it to test whether you can combine sorting with the two-pointer pattern and de-duplicate cleanly.
- #17mediumfoundational
17. Group Anagrams
Cluster strings that share the same letters; Squarespace uses it to test whether you choose a canonical-key strategy over pairwise comparisons.
- #18mediumfoundational
18. LRU Cache
Design a least-recently-used cache with O(1) get and put; Squarespace uses it to probe whether you combine a hash map with a doubly linked list correctly.
- #19mediumfoundational
19. Word Break
Decide whether a string can be segmented into a sequence of dictionary words; Squarespace uses it to test DP memoization on top of recursion.
- #20mediumfoundational
20. Coin Change
Compute the minimum number of coins that make up a target amount; Squarespace uses it to test bottom-up DP versus greedy mistakes.
- #21mediumfoundational
21. Number of Islands
Count connected groups of land cells in a 2D grid; Squarespace uses it to test grid traversal via BFS or DFS without redundant work.
- #22mediumfoundational
22. Course Schedule
Detect whether prerequisite dependencies allow all courses to be completed; Squarespace uses it to test cycle detection in a directed graph.
- #23hardfoundational
23. Median of Two Sorted Arrays
Compute the median of two sorted arrays without merging them; Squarespace uses it to test binary-search-on-partition fluency.
- #24hardfoundational
24. Trapping Rain Water
Compute how much water an elevation map traps after raining; Squarespace uses it to test whether you can reduce O(n) prefix arrays to a constant-space two-pointer pass.
- #25hardfoundational
25. Merge k Sorted Lists
Merge k sorted linked lists into one sorted list; Squarespace uses it to test whether you reach for a min-heap or pairwise merge to beat the naive O(k*N) concatenation.