Coding interview problems
3,736 problems: 937 Easy, 1,914 Medium, 885 Hard. Each runs against hidden tests, in 13 languages; database problems in SQL. Free for members.
Solve them in the app Explore guides
Problems 1,701–1,800 of 3,736
- 1701. Insertions to Embed a Sequence Hard · Array, Hash Table, Binary Search, Greedy
- 1702. Carve a Ridge Hard · Array, Binary Search, Dynamic Programming, Greedy
- 1703. Best Rectangle Under a Ceiling Hard · Array, Binary Search, Matrix, Prefix Sum
- 1704. Trailing Zero Preimages Hard · Math, Binary Search
- 1705. All-Ones Base Hard · Math, Binary Search
- 1706. Corner Block Pile Hard · Math, Binary Search, Greedy
- 1707. Split Chores Among Workers Hard · Array, Binary Search, Backtracking, Bit Manipulation
- 1708. Orchard Walk Within Steps Hard · Array, Binary Search, Sliding Window, Prefix Sum
- 1709. Brightest Weakest District Hard · Array, Binary Search, Greedy, Sliding Window, Queue
- 1710. Hens and Grain Hard · Array, Two Pointers, Binary Search, Sorting
- 1711. K-th Product of Two Sorted Lists Hard · Array, Binary Search
- 1712. Assign Tasks With Boost Pills Hard · Array, Binary Search, Greedy, Sorting, Queue
- 1713. Courses Before Deadlines Hard · Array, Greedy, Sorting, Heap (Priority Queue)
- 1714. Cheapest Crew of K Hard · Array, Greedy, Sorting, Heap (Priority Queue)
- 1715. Earliest Full Harvest Hard · Array, Greedy, Sorting
- 1716. Starting Stamina for All Trials Hard · Array, Greedy, Sorting
- 1717. Weighted Levelling Cost Hard · Array, Binary Search, Greedy, Sorting, Prefix Sum
- 1718. Most Chunks With Repeats Hard · Array, Stack, Greedy, Sorting, Monotonic Stack
- 1719. Raise the Ladder Hard · Array, Binary Search, Dynamic Programming, Sorting
- 1720. Near Twins Nearby Hard · Array, Sliding Window, Sorting, Hash Table
- 1721. Make a Gapless Run Hard · Array, Hash Table, Binary Search, Sliding Window
- 1722. Tallest Crate Stack Hard · Array, Dynamic Programming, Sorting
- 1723. Doubled Window Medians Hard · Array, Sliding Window, Sorting, Heap (Priority Queue)
- 1724. Fewest Egg Trials Hard · Math, Binary Search, Dynamic Programming
- 1725. Growing Team Rounds Hard · Array, Math, Binary Search, Greedy, Sorting
- 1726. Closest Subset Total Hard · Array, Two Pointers, Bit Manipulation, Sorting, Binary Search
- 1727. Tallest Towers Under Zoning Hard · Array, Math, Sorting
- 1728. Best Average of Long Runs Hard · Array, Binary Search, Prefix Sum
- 1729. Median of Distinct Counts Hard · Array, Hash Table, Binary Search, Sliding Window
- 1730. Time to Shrink the Total Hard · Array, Dynamic Programming, Sorting
- 1731. Dominant Pair Queries Hard · Array, Binary Search, Sorting, Stack, Monotonic Stack
- 1732. Nearest Adequate Room Hard · Array, Binary Search, Sorting
- 1733. Shortest Slot for Each Query Hard · Array, Binary Search, Sorting, Heap (Priority Queue)
- 1734. Rebuild From Shifted Copies Hard · Array, Hash Table, Sorting, Two Pointers
- 1735. Rebuild From Subset Totals Hard · Array, Divide and Conquer, Sorting
- 1736. Parity-Matched Similarity Hard · Array, Greedy, Sorting
- 1737. Marble Bag Spread Hard · Array, Greedy, Sorting, Heap (Priority Queue)
- 1738. Robots to Repair Bays Hard · Array, Dynamic Programming, Sorting
- 1739. Trim a Segment to Sort Hard · Array, Two Pointers, Binary Search
- 1740. Floored Ratio Total Hard · Array, Math, Binary Search, Prefix Sum
- 1741. Guards on a Square Fence Hard · Array, Binary Search, Greedy, Sorting
- 1742. Count Strictly Increasing Picks Hard · Array, Binary Search, Divide and Conquer, Sorting
- 1743. Least Edits to Make Monotone Hard · Array, Greedy, Heap (Priority Queue), Sorting
- 1744. Sort With One Empty Slot Hard · Array, Greedy, Sorting, Graph
- 1745. K-th Smallest Run Maximum Hard · Array, Binary Search, Two Pointers
- 1746. Sort by Prefix Reversals Count Medium · Array, Breadth-First Search, Sorting
- 1747. Sort With Distance-Limited Swaps Hard · Array, Union Find, Sorting
- 1748. Gather K Flags Side by Side Hard · Array, Greedy, Sliding Window, Prefix Sum
- 1749. Total Imbalance of Runs Hard · Array, Hash Table, Sorting
- 1750. Runs With Median K Hard · Array, Hash Table, Prefix Sum, Counting
- 1751. Fill Blanks With Two Values Hard · Array, Binary Search, Greedy
- 1752. Range of Sorted Run Sums Hard · Array, Binary Search, Two Pointers, Prefix Sum
- 1753. Earliest Second All Marked Medium · Array, Binary Search
- 1754. Garden Beauty With Extra Seeds Hard · Array, Two Pointers, Binary Search, Greedy, Sorting, Prefix Sum
- 1755. Drop One Point to Shrink the Spread Hard · Array, Math, Sorting
- 1756. Maximum Depth of Binary Tree Easy · Tree, Binary Tree, Depth-First Search, Breadth-First Search · Asked at Amazon, LinkedIn
- 1757. Invert Binary Tree Easy · Tree, Binary Tree, Depth-First Search, Breadth-First Search · Asked at Google, Amazon
- 1758. Symmetric Tree Easy · Tree, Binary Tree, Depth-First Search, Breadth-First Search · Asked at Amazon, Microsoft, Bloomberg
- 1759. Binary Tree Level Order Traversal Medium · Tree, Binary Tree, Breadth-First Search · Asked at Amazon, Meta, Microsoft
- 1760. Validate Binary Search Tree Medium · Tree, Binary Tree, Binary Search Tree, Depth-First Search · Asked at Amazon, Meta, Microsoft
- 1761. Kth Smallest Element in a BST Medium · Tree, Binary Tree, Binary Search Tree, Depth-First Search · Asked at Amazon, Google, Uber
- 1762. Construct Binary Tree from Preorder and Inorder Traversal Medium · Array, Hash Table, Divide and Conquer, Binary Tree · Asked at Amazon, Microsoft, Bloomberg
- 1763. Binary Tree Maximum Path Sum Hard · Tree, Binary Tree, Depth-First Search, Dynamic Programming · Asked at Meta, Google, Amazon
- 1764. Binary Tree Cameras Hard · Tree, Binary Tree, Depth-First Search, Dynamic Programming, Greedy · Asked at Google
- 1765. Count Every Node in the Orchard Easy · Tree, Binary Tree, Depth-First Search, Recursion
- 1766. Read the Rows in Snake Order Medium · Tree, Binary Tree, Breadth-First Search
- 1767. Rows from the Ground Up Medium · Tree, Binary Tree, Breadth-First Search
- 1768. What You See from the East Side Medium · Tree, Binary Tree, Breadth-First Search, Depth-First Search
- 1769. Insertion Orders Giving the Same BST Hard · Tree, Binary Search Tree, Divide and Conquer, Dynamic Programming, Math
- 1770. Mirror Image Pair Easy · Tree, Binary Tree, Depth-First Search, Breadth-First Search
- 1771. Count the Bare Twigs Easy · Tree, Binary Tree, Depth-First Search
- 1772. Shallowest Leaf Depth Easy · Tree, Binary Tree, Breadth-First Search
- 1773. Largest Value Anywhere in the Tree Easy · Tree, Binary Tree, Depth-First Search
- 1774. Total of Leaves Hanging on the Left Easy · Tree, Binary Tree, Depth-First Search
- 1775. Are Two Trees Exact Copies Easy · Tree, Binary Tree, Depth-First Search, Recursion
- 1776. Is the Value Somewhere in the Tree Easy · Tree, Binary Tree, Depth-First Search, Breadth-First Search
- 1777. Find a Key in a Sorted Tree Easy · Tree, Binary Search Tree, Binary Tree
- 1778. Place a New Key in a BST Easy · Tree, Binary Search Tree, Binary Tree
- 1779. Smallest Gap Between Two Tags Easy · Tree, Binary Search Tree, Binary Tree, Depth-First Search
- 1780. Total of Tags Inside a Window Easy · Tree, Binary Search Tree, Binary Tree, Depth-First Search
- 1781. Visit Order: Node Before Children Easy · Tree, Binary Tree, Depth-First Search, Stack
- 1782. Visit Order: Left, Node, Right Easy · Tree, Binary Tree, Depth-First Search, Stack
- 1783. Visit Order: Children Before Node Easy · Tree, Binary Tree, Depth-First Search, Stack
- 1784. Is the Tree on an Even Keel Easy · Tree, Binary Tree, Depth-First Search
- 1785. Longest Span Between Two Nodes Easy · Tree, Binary Tree, Depth-First Search
- 1786. Does Any Branch Hit the Target Easy · Tree, Binary Tree, Depth-First Search
- 1787. Spell Out Every Branch Easy · Tree, Binary Tree, Depth-First Search, Backtracking, String
- 1788. Overlay Two Orchards Easy · Tree, Binary Tree, Depth-First Search, Recursion
- 1789. Do All Nodes Carry One Value Easy · Tree, Binary Tree, Depth-First Search
- 1790. Build a Balanced Index from Sorted IDs Easy · Tree, Binary Search Tree, Binary Tree, Divide and Conquer, Array
- 1791. Is One Tree Hidden Inside Another Easy · Tree, Binary Tree, Depth-First Search
- 1792. Are the Two Nodes Cousins Easy · Tree, Binary Tree, Breadth-First Search
- 1793. Total of Each Row Easy · Tree, Binary Tree, Breadth-First Search
- 1794. Do Two Trees Share a Leaf Row Easy · Tree, Binary Tree, Depth-First Search
- 1795. Total Imbalance Score Easy · Tree, Binary Tree, Depth-First Search
- 1796. Most Frequent Tags in a BST Easy · Tree, Binary Search Tree, Binary Tree, Depth-First Search
- 1797. Two Tags That Add Up Easy · Tree, Binary Search Tree, Binary Tree, Hash Table
- 1798. Unroll a BST into a Chain Easy · Tree, Binary Search Tree, Binary Tree, Depth-First Search
- 1799. Parent Equals Its Children's Total Easy · Tree, Binary Tree, Depth-First Search
- 1800. Evaluate a Logic Gate Tree Easy · Tree, Binary Tree, Depth-First Search, Recursion