Mercury Coding Interview Questions
25 Mercury coding interview problems with full optimal solutions — 11 easy, 11 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 Mercury interviewer values, and a FAQ section.
Showing 11 problems of 25
- #1easyfoundational
1. Two Sum
Find indices of two numbers in an array that add up to a target.
- #2easyfoundational
2. Valid Parentheses
Determine if a string of brackets is validly nested and matched.
- #3easyfoundational
3. Merge Two Sorted Lists
Merge two sorted linked lists into one sorted list by splicing nodes.
- #4easyfoundational
4. Remove Duplicates from Sorted Array
Remove duplicates in-place from a sorted array and return new length.
- #5easyfoundational
5. Remove Element
Remove all occurrences of a value from an array in-place.
- #6easyfoundational
6. Same Tree
Check whether two binary trees are structurally identical and hold equal node values.
- #7easyfoundational
7. Symmetric Tree
Determine if a binary tree is a mirror of itself around its center.
- #8easyfoundational
8. Maximum Depth of Binary Tree
Compute the maximum depth (longest root-to-leaf path) of a binary tree.
- #9easyfoundational
9. Best Time to Buy and Sell Stock
Find the maximum profit from a single buy-then-sell pair in a price series.
- #10easyfoundational
10. Single Number
Find the one element that appears exactly once where every other element appears twice.
- #11easyfoundational
11. Linked List Cycle
Detect whether a linked list contains a cycle.