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 301–400 of 3,736
- 301. Keep Equal Letters Apart Hard · String, Greedy, Heap (Priority Queue), Counting
- 302. Toggle the Grid to Zero Hard · Array, Matrix, Bit Manipulation, Breadth-First Search
- 303. Stamp the Target Hard · String, Stack, Greedy, Queue
- 304. Partners Side by Side Hard · Array, Greedy, Union Find
- 305. First Day With a Gap of k Hard · Array, Sliding Window, Queue
- 306. Area Under Many Rectangles Hard · Array, Sorting, Math
- 307. Exact Tiling Check Hard · Array, Hash Table, Math
- 308. Does the Path Cross Itself? Hard · Array, Math
- 309. Reach by Adding Hard · Math
- 310. Cheapest Common Level Hard · Array, Sorting, Binary Search, Prefix Sum, Greedy
- 311. Fewest Edits to a Consecutive Run Hard · Array, Binary Search, Sliding Window, Hash Table
- 312. Shortest Window Reaching a Total Hard · Array, Queue, Prefix Sum, Monotonic Stack
- 313. Windows With Fixed Extremes Hard · Array, Sliding Window, Queue
- 314. Windows With Median k Hard · Array, Hash Table, Prefix Sum
- 315. Three Disjoint Windows Hard · Array, Dynamic Programming, Prefix Sum, Sliding Window
- 316. Flip k at a Time Hard · Array, Bit Manipulation, Queue, Sliding Window, Prefix Sum
- 317. Shortest Unique Abbreviations Hard · String, Greedy, Trie, Sorting
- 318. Mirror Chunk Split Hard · String, Greedy, Two Pointers
- 319. Prefix Match Score Sum Hard · String, Binary Search
- 320. Most Prefix Deletions Hard · String, Dynamic Programming
- 321. Smallest Subsequence With a Letter Quota Hard · String, Stack, Greedy, Monotonic Stack
- 322. Largest Number From Two Rows Hard · Array, Greedy, Stack, Monotonic Stack
- 323. Count Anagram Sentences Medium · String, Math, Counting
- 324. Distinct Good Binary Subsequences Hard · String, Dynamic Programming
- 325. Five-Digit Mirror Subsequences Hard · String, Dynamic Programming
- 326. Mini Lisp Evaluator Hard · String, Stack, Hash Table, Recursion
- 327. Brace Set Expansion Hard · String, Stack, Backtracking
- 328. Is It a Number? Hard · String
- 329. Longest Balanced Brackets Hard · String, Stack, Dynamic Programming
- 330. Reorder Special Bit Strings Hard · String, Recursion, Sorting
- 331. All Codes Sequence Hard · String, Depth-First Search, Graph
- 332. Best Window Around an Index Hard · Array, Two Pointers, Greedy
- 333. Fence Around the Trees Hard · Array, Math
- 334. Patch to Cover 1..n Hard · Array, Greedy
- 335. Same Average Split Hard · Array, Dynamic Programming, Bit Manipulation, Math
- 336. Triplets in Order in Both Hard · Array, Binary Search, Divide and Conquer
- 337. Numbers From a Digit Set Hard · Math, String, Dynamic Programming
- 338. Make the Grid Upper-Triangular Medium · Array, Matrix, Greedy
- 339. Count Ones Pyramids Hard · Array, Matrix, Dynamic Programming
- 340. Lamp Grid Queries Hard · Array, Hash Table
- 341. Puzzle Word Matches Hard · Array, String, Hash Table, Bit Manipulation, Trie
- 342. Cheapest and Dearest Bag Splits Hard · Array, Greedy, Sorting, Heap (Priority Queue)
- 343. How Often Does One Repeat Fit Another? Hard · String, Dynamic Programming
- 344. Most Long Mirrors Without Overlap Hard · String, Dynamic Programming, Greedy
- 345. Equal Circular Window Sums Hard · Array, Math, Sorting
- 346. Total Imbalance of Subarrays Hard · Array, Hash Table
- 347. Gather k Ones Together Hard · Array, Prefix Sum, Sliding Window, Greedy
- 348. Longest Rearrangeable Mirror Substring Hard · String, Bit Manipulation, Hash Table
- 349. Shortest Missing Roll Sequence Hard · Array, Greedy, Hash Table
- 350. Cheapest Fix for Matching Slots Hard · Array, Greedy, Hash Table, Counting
- 351. Longest Strictly Rising Cell Hops Hard · Array, Matrix, Sorting, Dynamic Programming
- 352. String From an LCP Table Hard · String, Dynamic Programming, Greedy, Matrix
- 353. Most Beautiful k Distinct Letters Hard · String, Hash Table, Math, Greedy
- 354. Split Values to Sort Hard · Array, Greedy, Math
- 355. Count 1-3-2-4 Patterns Hard · Array, Dynamic Programming, Prefix Sum
- 356. Echo Substrings Hard · String, Hash Table
- 357. Greatest Suffix Hard · String, Two Pointers
- 358. Cheapest Removal Keeping a Subsequence Hard · String, Two Pointers, Binary Search
- 359. Longest k-Times Subsequence Hard · String, Greedy, Backtracking
- 360. Split a Message With Part Tags Hard · String, Binary Search, Simulation
- 361. Fewest Deletions for a Divisor Hard · Array, Math, Sorting, Heap (Priority Queue)
- 362. Longest Battery Run Hard · Array, Binary Search, Greedy, Sorting
- 363. Raise Ranges to the Target Medium · Array, Greedy, Stack
- 364. Keep Columns Sorted Across Rows Hard · String, Array, Dynamic Programming
- 365. Window With a Given Hash Medium · String, Sliding Window
- 366. Steps to a Sorted String Hard · String, Math, Counting
- 367. Ransom Note Easy · Hash Table, String, Counting · Asked at Amazon, Microsoft
- 368. Isomorphic Strings Easy · Hash Table, String · Asked at Google, LinkedIn
- 369. Contains Duplicate II Easy · Array, Hash Table, Sliding Window · Asked at Amazon, Google
- 370. Group Anagrams Medium · Array, Hash Table, String, Sorting · Asked at Amazon, Google, Meta
- 371. Longest Consecutive Sequence Medium · Array, Hash Table, Union Find · Asked at Google, Amazon, Meta
- 372. Determine if Two Strings Are Close Medium · Hash Table, String, Sorting, Counting · Asked at Amazon
- 373. Substring with Concatenation of All Words Hard · Hash Table, String, Sliding Window · Asked at Amazon
- 374. Palindrome Pairs Hard · Array, Hash Table, String · Asked at Google, Airbnb
- 375. First Badge Scanned Twice Easy · Array, Hash Table
- 376. Pairs with Sum Divisible by K Medium · Array, Hash Table, Counting, Math
- 377. Four-List Zero Tuples Medium · Array, Hash Table
- 378. Top Played Tracks Medium · Array, Hash Table, Heap (Priority Queue), Sorting, Counting
- 379. Sum of Lone Sensor Readings Easy · Array, Hash Table, Counting
- 380. Two Gifts for an Exact Budget Easy · Array, Hash Table
- 381. Songs on Both Playlists Easy · Array, Hash Table, Sorting
- 382. Shared Stock with Repeats Easy · Array, Hash Table, Counting, Sorting
- 383. First Character Without a Twin Easy · String, Hash Table, Counting, Queue
- 384. Counting Rare Stones Easy · String, Hash Table
- 385. Words Typed with One Hand Easy · Array, String, Hash Table
- 386. Duplicated and Missing Ticket Easy · Array, Hash Table, Math
- 387. Sentence Uses Every Letter Easy · String, Hash Table
- 388. Election Winner by Votes Easy · Array, String, Hash Table, Counting
- 389. Value Equal to Its Count Easy · Array, Hash Table, Counting
- 390. All Occurrence Counts Distinct Easy · Array, Hash Table, Counting
- 391. Matching Pairs in a Row Easy · Array, Hash Table, Counting, Math
- 392. Final Stop of a Route Easy · Array, Hash Table
- 393. Distinct Mail Inboxes Easy · Array, String, Hash Table
- 394. Walker Revisits a Spot Easy · String, Hash Table, Simulation
- 395. Words Lonely Across Two Notes Easy · String, Hash Table, Counting, Sorting
- 396. Words Buildable from Tiles Easy · Array, String, Hash Table, Counting
- 397. Extra Letter Slipped In Easy · String, Hash Table, Counting, Bit Manipulation
- 398. Digit-Square Chain Reaches One Easy · Math, Hash Table
- 399. Best Shared Pick Easy · Array, String, Hash Table
- 400. Permutation of the Range Easy · Array, Hash Table