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,801–1,900 of 3,736
- 1801. Tag Closest to a Target Easy · Tree, Binary Search Tree, Binary Tree, Binary Search
- 1802. Nodes with a Grandparent Divisible by Three Easy · Tree, Binary Tree, Depth-First Search
- 1803. Depth of a Given Value Easy · Tree, Binary Tree, Breadth-First Search
- 1804. Height of a Family Tree from Parent Links Easy · Tree, Array, Depth-First Search
- 1805. Find the Founder from Parent-Child Records Easy · Tree, Hash Table, Graph
- 1806. How Many Nodes Sit on Level k Easy · Tree, Binary Tree, Breadth-First Search
- 1807. Which Row Has the Most Nodes Easy · Tree, Binary Tree, Breadth-First Search
- 1808. Odd Rows Minus Even Rows Easy · Tree, Binary Tree, Breadth-First Search
- 1809. Is Every Level Completely Filled Easy · Tree, Binary Tree, Depth-First Search
- 1810. Zero or Two Children Everywhere Easy · Tree, Binary Tree, Depth-First Search
- 1811. Does Any Value Repeat Easy · Tree, Binary Tree, Hash Table
- 1812. Count Parents with a Single Child Easy · Tree, Binary Tree, Depth-First Search
- 1813. Snip Zero-Valued Tips Once Easy · Tree, Binary Tree, Depth-First Search
- 1814. Floor and Ceiling in a BST Easy · Tree, Binary Search Tree, Binary Tree, Binary Search
- 1815. Spread Between Smallest and Largest Tag Easy · Tree, Binary Search Tree, Binary Tree
- 1816. Cheapest Root-to-Leaf Branch Easy · Tree, Binary Tree, Depth-First Search
- 1817. List the Only Children Easy · Tree, Binary Tree, Depth-First Search, Sorting
- 1818. Write a Tree in Bracket Notation Easy · Tree, Binary Tree, Depth-First Search, String
- 1819. Depth-Weighted Total Easy · Tree, Binary Tree, Depth-First Search
- 1820. Nodes Smaller Than the Root Easy · Tree, Binary Tree, Depth-First Search
- 1821. Is One Node an Ancestor of Another Easy · Tree, Binary Tree, Depth-First Search
- 1822. Nodes That Copy Their Parent Easy · Tree, Binary Tree, Depth-First Search
- 1823. Strictly Rising Branches Easy · Tree, Binary Tree, Depth-First Search
- 1824. Swap Children on Even Rows Easy · Tree, Binary Tree, Depth-First Search
- 1825. Cut Everything Below Depth k Easy · Tree, Binary Tree, Depth-First Search
- 1826. Label Each Node with Its Subtree Size Easy · Tree, Binary Tree, Depth-First Search
- 1827. Nodes Whose Value Equals Their Depth Easy · Tree, Binary Tree, Depth-First Search
- 1828. Height of a BST Built by Insertions Easy · Tree, Binary Search Tree, Binary Tree, Array
- 1829. Spread of Each Row Easy · Tree, Binary Tree, Breadth-First Search
- 1830. Follow the Turns Easy · Tree, Binary Tree, String, Simulation
- 1831. Directions from the Root to a Node Easy · Tree, Binary Tree, Depth-First Search, String
- 1832. Second-Smallest in a Min-Merge Tree Easy · Tree, Binary Tree, Depth-First Search
- 1833. Climb k Levels Up Easy · Tree, Binary Tree, Depth-First Search
- 1834. Total Weight of a Team Easy · Tree, Array, Graph, Depth-First Search
- 1835. Size of Every Team Easy · Tree, Array, Depth-First Search
- 1836. Hub of a Star Network Easy · Tree, Graph
- 1837. Paint a Tree Without Clashes Easy · Tree, Math
- 1838. Nodes Larger Than Everything Below Easy · Tree, Binary Tree, Depth-First Search
- 1839. Does the Array Obey the Max-Heap Rule Easy · Tree, Array
- 1840. Height of a Many-Child Tree Easy · Tree, Depth-First Search, Recursion
- 1841. Visit a Many-Child Tree Top-Down Easy · Tree, Depth-First Search, Stack
- 1842. Count Words Starting a Certain Way Easy · Trie, String
- 1843. Count the Leaves in a Parent Array Easy · Tree, Array, Counting
- 1844. Peak of Each Row Medium · Tree, Binary Tree, Breadth-First Search
- 1845. Widest Row Counting Gaps Medium · Tree, Binary Tree, Breadth-First Search
- 1846. Deepest Leftmost Leaf Medium · Tree, Binary Tree, Breadth-First Search
- 1847. Weight of the Lowest Row Medium · Tree, Binary Tree, Breadth-First Search
- 1848. List the Tree Column by Column Medium · Tree, Binary Tree, Breadth-First Search, Hash Table
- 1849. What a Drone Sees from Above Medium · Tree, Binary Tree, Breadth-First Search, Hash Table
- 1850. Trace the Outline of a Tree Medium · Tree, Binary Tree, Depth-First Search
- 1851. Slice the Tree Diagonally Medium · Tree, Binary Tree, Depth-First Search, Hash Table
- 1852. Row with the Largest Total Medium · Tree, Binary Tree, Breadth-First Search
- 1853. Alternating Parity Rows Medium · Tree, Binary Tree, Breadth-First Search
- 1854. No Gaps Before the End Medium · Tree, Binary Tree, Breadth-First Search
- 1855. Replace Each Node with Its Cousins' Total Medium · Tree, Binary Tree, Breadth-First Search, Hash Table
- 1856. Reverse the Odd Rows of a Perfect Tree Medium · Tree, Binary Tree, Depth-First Search, Breadth-First Search
- 1857. Swaps to Sort Every Row Medium · Tree, Binary Tree, Breadth-First Search, Sorting
- 1858. Insert a Row of New Nodes Medium · Tree, Binary Tree, Breadth-First Search
- 1859. Kth Heaviest Row Medium · Tree, Binary Tree, Breadth-First Search, Heap (Priority Queue), Sorting
- 1860. Neighbour to the Right Medium · Tree, Binary Tree, Breadth-First Search
- 1861. All Branches That Spend the Budget Exactly Medium · Tree, Binary Tree, Depth-First Search, Backtracking
- 1862. Downward Runs with a Target Sum Medium · Tree, Binary Tree, Depth-First Search, Prefix Sum, Hash Table
- 1863. Read Each Branch as a Number Medium · Tree, Binary Tree, Depth-First Search
- 1864. Nodes Not Overshadowed by Ancestors Medium · Tree, Binary Tree, Depth-First Search
- 1865. Largest Gap to an Ancestor Medium · Tree, Binary Tree, Depth-First Search
- 1866. Longest Switchback Walk Medium · Tree, Binary Tree, Depth-First Search, Dynamic Programming
- 1867. Longest Path with One Label Medium · Tree, Binary Tree, Depth-First Search
- 1868. Longest Counting-Up Run Medium · Tree, Binary Tree, Depth-First Search
- 1869. Branches That Could Read as Palindromes Medium · Tree, Binary Tree, Depth-First Search, Bit Manipulation
- 1870. Smallest Word Read from a Leaf Upward Medium · Tree, Binary Tree, Depth-First Search, String
- 1871. Nodes Equal to Their Subtree's Average Medium · Tree, Binary Tree, Depth-First Search
- 1872. Best Single Cut Medium · Tree, Binary Tree, Depth-First Search
- 1873. Cut into Two Equal Halves Medium · Tree, Binary Tree, Depth-First Search, Hash Table
- 1874. Most Common Subtree Total Medium · Tree, Binary Tree, Depth-First Search, Hash Table
- 1875. Spread the Coins Evenly Medium · Tree, Binary Tree, Depth-First Search, Greedy
- 1876. Treasure Haul Without Neighbours Medium · Tree, Binary Tree, Depth-First Search, Dynamic Programming
- 1877. Forest Sizes After Removals Medium · Tree, Binary Tree, Depth-First Search, Hash Table
- 1878. Nearest Shared Ancestor Medium · Tree, Binary Tree, Depth-First Search
- 1879. Root of the Deepest Cluster Medium · Tree, Binary Tree, Depth-First Search
- 1880. Nodes Exactly k Steps Away Medium · Tree, Binary Tree, Breadth-First Search, Hash Table
- 1881. Minutes for Rot to Spread Medium · Tree, Binary Tree, Breadth-First Search, Hash Table
- 1882. Hops Between Two Nodes Medium · Tree, Binary Tree, Depth-First Search
- 1883. Turn-by-Turn Directions in a Tree Medium · Tree, Binary Tree, Depth-First Search, String
- 1884. Flatten into a Preorder Chain Medium · Tree, Binary Tree, Depth-First Search, Linked List
- 1885. Equal up to Child Swaps Medium · Tree, Binary Tree, Depth-First Search
- 1886. Swaps to Match a Visit Order Medium · Tree, Binary Tree, Depth-First Search
- 1887. Rebuild a Full Tree from Pre- and Post-Order Medium · Tree, Binary Tree, Divide and Conquer, Hash Table
- 1888. Rebuild a BST from Its Preorder Medium · Tree, Binary Search Tree, Binary Tree, Stack
- 1889. Could This Be a BST Preorder Medium · Tree, Binary Search Tree, Stack, Monotonic Stack
- 1890. Build the Peak-Rooted Tree Medium · Tree, Binary Tree, Stack, Monotonic Stack, Divide and Conquer
- 1891. How Many BST Shapes for 1..n Medium · Tree, Binary Search Tree, Dynamic Programming, Math
- 1892. Fix the Two Swapped Tags Medium · Tree, Binary Search Tree, Binary Tree, Depth-First Search
- 1893. Remove a Key from a BST Medium · Tree, Binary Search Tree, Binary Tree
- 1894. Clip a BST to a Range Medium · Tree, Binary Search Tree, Binary Tree, Depth-First Search
- 1895. Add All Larger Tags Medium · Tree, Binary Search Tree, Binary Tree, Depth-First Search
- 1896. Next Tag After x Medium · Tree, Binary Search Tree, Binary Tree
- 1897. k Tags Nearest a Target Medium · Tree, Binary Search Tree, Binary Tree, Two Pointers, Heap (Priority Queue)
- 1898. Step Through a BST Medium · Tree, Binary Search Tree, Stack, Design
- 1899. A Pair Across Two BSTs Medium · Tree, Binary Search Tree, Binary Tree, Two Pointers
- 1900. All Tags from Two BSTs in Order Medium · Tree, Binary Search Tree, Binary Tree, Two Pointers, Sorting