LeetCode 04xx

LeetCode problems 400–499

100 items

LeetCode 04xx

# Problem Difficulty Time Notes
400 Nth Digit 🟡 Medium 1m 15s The problem asks us to find the digit that appears at position n in…
401 Binary Watch 🟢 Easy 1m 17s The problem describes a binary watch that uses LEDs to represent ti…
402 Remove K Digits 🟡 Medium 1m 26s The problem gives us a numeric string num and an integer k. We must…
403 Frog Jump 🔴 Hard 1m 17s The problem describes a frog trying to cross a river by jumping acr…
404 Sum of Left Leaves 🟢 Easy 1m 4s The problem gives us the root node of a binary tree and asks us to …
405 Convert a Number to Hexadecimal 🟢 Easy 40s The problem asks us to convert a given 32-bit integer num into its …
406 Queue Reconstruction by Height 🟡 Medium 1m 5s This problem gives us a list of people where each person is represe…
407 Trapping Rain Water II 🔴 Hard 1m 22s This problem is the two dimensional version of the classic "Trappin…
408 Valid Word Abbreviation 🟢 Easy 1m 26s In this problem, we are given two strings: - word, the original ful…
409 Longest Palindrome 🟢 Easy 38s The problem asks us to find the length of the longest palindrome th…
410 Split Array Largest Sum 🔴 Hard 1m 22s The problem gives an integer array nums and an integer k. We must d…
411 Minimum Unique Word Abbreviation 🔴 Hard 1m 10s This problem asks us to generate the shortest possible abbreviation…
412 Fizz Buzz 🟢 Easy 1m 27s The problem asks us to generate a list of strings for all integers …
413 Arithmetic Slices 🟡 Medium 1m 24s The problem asks us to count how many contiguous subarrays of lengt…
414 Third Maximum Number 🟢 Easy 1m 23s The problem asks us to find the third distinct maximum number in an…
415 Add Strings 🟢 Easy 1m 10s The problem asks us to add two non-negative integers where each int…
416 Partition Equal Subset Sum 🟡 Medium 1m 4s The problem asks whether an array of positive integers can be divid…
417 Pacific Atlantic Water Flow 🟡 Medium 1m 24s The problem gives us a rectangular grid called heights, where each …
418 Sentence Screen Fitting 🟡 Medium 1m 7s The problem gives us a screen with a fixed number of rows and cols,…
419 Battleships in a Board 🟡 Medium 1m This problem gives us a two dimensional grid where each cell contai…
420 Strong Password Checker 🔴 Hard 1m 21s The problem asks us to determine the minimum number of operations r…
421 Maximum XOR of Two Numbers in an Array 🟡 Medium 1m 29s The problem gives us an array of non-negative integers called nums.…
422 Valid Word Square 🟢 Easy 30s The problem asks us to determine whether a given list of strings fo…
423 Reconstruct Original Digits from English 🟡 Medium 40s The problem asks us to reconstruct digits from a jumbled string of …
424 Longest Repeating Character Replacement 🟡 Medium 1m 15s The problem gives us a string s consisting only of uppercase Englis…
425 Word Squares 🔴 Hard 39s The problem is asking us to generate all possible word squares from…
426 Convert Binary Search Tree to Sorted Doubly Linked List 🟡 Medium 1m 8s The problem asks us to transform a Binary Search Tree, abbreviated …
427 Construct Quad Tree 🟡 Medium 1m 23s The problem asks us to convert a binary matrix into a Quad-Tree rep…
428 Serialize and Deserialize N-ary Tree 🔴 Hard 1m 24s LeetCode 428, LeetCode Serialize and Deserialize N-ary Tree, asks u…
429 N-ary Tree Level Order Traversal 🟡 Medium 40s The problem asks us to perform a level order traversal of an n-ary …
430 Flatten a Multilevel Doubly Linked List 🟡 Medium 1m 24s The problem gives us a special type of doubly linked list where eve…
431 Encode N-ary Tree to Binary Tree 🔴 Hard 1m 29s This problem asks us to design a reversible transformation between …
432 All O`one Data Structure 🔴 Hard 1m 24s The problem asks us to design a special data structure that stores …
433 Minimum Genetic Mutation 🟡 Medium 1m 34s The problem describes a mutation process between genetic sequences.…
434 Number of Segments in a String 🟢 Easy 1m 1s The problem asks us to count how many separate word-like groups exi…
435 Non-overlapping Intervals 🟡 Medium 1m 28s The problem gives an array of intervals where each interval is repr…
436 Find Right Interval 🟡 Medium 44s This problem asks us to find, for each interval in a list, the "rig…
437 Path Sum III 🟡 Medium 1m 11s The problem gives us the root of a binary tree and an integer targe…
438 Find All Anagrams in a String 🟡 Medium 1m 21s The problem gives two strings, s and p, both containing only lowerc…
439 Ternary Expression Parser 🟡 Medium 1m 16s The problem gives us a string representing a nested ternary express…
440 K-th Smallest in Lexicographical Order 🔴 Hard 1m 19s The problem asks us to find the k-th smallest number in lexicograph…
441 Arranging Coins 🟢 Easy 1m 9s The problem asks us to determine how many complete rows of a coin s…
442 Find All Duplicates in an Array 🟡 Medium 1m 10s The problem gives us an integer array nums of length n, where every…
443 String Compression 🟡 Medium 1m 4s The problem asks us to perform in place string compression on an ar…
444 Sequence Reconstruction 🟡 Medium 1m 21s This problem asks us to determine whether the given array nums is b…
445 Add Two Numbers II 🟡 Medium 1m 12s The problem gives us two non-empty singly linked lists where each n…
446 Arithmetic Slices II - Subsequence 🔴 Hard 1m 20s The problem asks us to count how many arithmetic subsequences exist…
447 Number of Boomerangs 🟡 Medium 1m 20s The problem asks us to count the number of valid boomerangs among a…
448 Find All Numbers Disappeared in an Array 🟢 Easy 54s The problem asks us to find all the integers in the range [1, n] th…
449 Serialize and Deserialize BST 🟡 Medium 1m 8s The problem asks us to design two operations for a Binary Search Tr…
450 Delete Node in a BST 🟡 Medium 1m 29s The problem asks us to delete a node with a specific value, key, fr…
451 Sort Characters By Frequency 🟡 Medium 54s The problem asks us to rearrange the characters of a string so that…
452 Minimum Number of Arrows to Burst Balloons 🟡 Medium 41s This problem is asking us to determine the minimum number of vertic…
453 Minimum Moves to Equal Array Elements 🟡 Medium 44s The problem gives an integer array nums with n elements. In a singl…
454 4Sum II 🟡 Medium 1m 13s The problem gives four integer arrays, nums1, nums2, nums3, and num…
455 Assign Cookies 🟢 Easy 48s This problem asks us to maximize the number of children who can be …
456 132 Pattern 🟡 Medium 1m 19s The problem asks us to determine whether an array contains a specif…
457 Circular Array Loop 🟡 Medium 1m 25s This problem asks us to determine whether a circular array contains…
458 Poor Pigs 🔴 Hard 57s The problem gives us a set of buckets where exactly one bucket cont…
459 Repeated Substring Pattern 🟢 Easy 48s The problem asks us to determine whether a given string can be form…
460 LFU Cache 🔴 Hard 1m 11s The problem asks us to design a cache that supports two operations:…
461 Hamming Distance 🟢 Easy 46s The problem asks us to compute the Hamming distance between two int…
462 Minimum Moves to Equal Array Elements II 🟡 Medium 53s This problem asks us to determine the minimum number of moves requi…
463 Island Perimeter 🟢 Easy 32s The problem asks us to calculate the perimeter of an island represe…
464 Can I Win 🟡 Medium 56s This problem describes a two-player turn-based game. Players take t…
465 Optimal Account Balancing 🔴 Hard 1m 33s The problem gives a list of money transfers between people. Each tr…
466 Count The Repetitions 🔴 Hard 34s The problem asks us to find the maximum number of times a string st…
467 Unique Substrings in Wraparound String 🟡 Medium 1m 16s The problem defines an infinite cyclic string built from the lowerc…
468 Validate IP Address 🟡 Medium 1m 19s The problem asks us to determine whether a given string represents …
469 Convex Polygon 🟡 Medium 1m 6s The problem gives us a sequence of points on a 2D plane. These poin…
470 Implement Rand10() Using Rand7() 🟡 Medium 1m 19s The problem provides access to a single API, rand7(), which returns…
471 Encode String with Shortest Length 🔴 Hard 48s Here’s a fully detailed technical solution guide following your req…
472 Concatenated Words 🔴 Hard 39s The problem asks us to identify all words in a given list that can …
473 Matchsticks to Square 🟡 Medium 1m 15s The problem gives us an array called matchsticks, where each elemen…
474 Ones and Zeroes 🟡 Medium 1m 13s This problem asks us to select the largest possible subset of binar…
475 Heaters 🟡 Medium 54s The problem gives two arrays, houses and heaters, where each value …
476 Number Complement 🟢 Easy 56s The problem asks us to compute the complement of a positive integer…
477 Total Hamming Distance 🟡 Medium 1m 11s The problem asks us to compute the total Hamming distance between e…
478 Generate Random Point in a Circle 🟡 Medium 1m 23s This problem asks us to generate random points uniformly inside a c…
479 Largest Palindrome Product 🔴 Hard 1m 14s The problem asks us to find the largest palindrome number that can …
480 Sliding Window Median 🔴 Hard 1m 32s The problem asks us to compute the median for every contiguous suba…
481 Magical String 🟡 Medium 1m 26s This problem defines a special infinite sequence called the magical…
482 License Key Formatting 🟢 Easy 1m 10s The problem gives us a string s that represents a license key. The …
483 Smallest Good Base 🔴 Hard 57s The problem is asking us to find the smallest integer k = 2 such th…
484 Find Permutation 🟡 Medium 1m 9s The problem gives us a string s consisting only of the characters '…
485 Max Consecutive Ones 🟢 Easy 57s The problem gives us a binary array named nums, where every element…
486 Predict the Winner 🟡 Medium 1m 9s The problem describes a two-player game played on an integer array.…
487 Max Consecutive Ones II 🟡 Medium 1m The problem gives us a binary array nums, where every element is ei…
488 Zuma Game 🔴 Hard 1m 24s The problem models a recursive elimination game played on a row of …
489 Robot Room Cleaner 🔴 Hard 1m 7s This problem is an interactive backtracking problem where we must c…
490 The Maze 🟡 Medium 1m 22s This problem asks us to determine whether a rolling ball can stop e…
491 Non-decreasing Subsequences 🟡 Medium 2m 43s The problem gives us an integer array nums and asks us to return ev…
492 Construct the Rectangle 🟢 Easy 43s The problem gives us a single integer, area, which represents the a…
493 Reverse Pairs 🔴 Hard 59s The problem asks us to count how many pairs of indices (i, j) satis…
494 Target Sum 🟡 Medium 1m 9s The problem asks us to count how many different ways we can assign …
495 Teemo Attacking 🟢 Easy 34s The problem asks us to calculate the total duration that Ashe is po…
496 Next Greater Element I 🟢 Easy 55s The problem is asking us to find the next greater element for each …
497 Random Point in Non-overlapping Rectangles 🟡 Medium 32s The problem asks us to randomly pick an integer point from a set of…
498 Diagonal Traverse 🟡 Medium 1m 30s This problem asks us to traverse a matrix in a specific diagonal pa…
499 The Maze III 🔴 Hard 2m 15s This problem extends the mechanics introduced in earlier Maze probl…