LeetCode JavaScript Solutions

A collection of 845 elegant solutions to LeetCode problems.

All Problems

Two Sum

#1 Easy

Add Two Numbers

#2 Medium

Longest Substring Without Repeating Characters

#3 Medium

Median of Two Sorted Arrays

#4 Hard

Longest Palindromic Substring

#5 Medium

ZigZag Conversion

#6 Medium

Reverse Integer

#7 Easy

String to Integer (atoi)

#8 Medium

Palindrome Number

#9 Easy

Regular Expression Matching

#10 Hard

Container With Most Water

#11 Medium

Integer to Roman

#12 Medium

Roman to Integer

#13 Easy

Longest Common Prefix

#14 Easy

3Sum

#15 Medium

3Sum Closest

#16 Medium

Letter Combinations of a Phone Number

#17 Medium

4Sum

#18 Medium

Remove Nth Node From End of List

#19 Medium

Valid Parentheses

#20 Easy

Merge Two Sorted Lists

#21 Easy

Generate Parentheses

#22 Medium

Merge k Sorted Lists

#23 Hard

Swap Nodes in Pairs

#24 Medium

Reverse Nodes in k-Group

#25 Hard

Remove Duplicates from Sorted Array

#26 Easy

Remove Element

#27 Easy

Implement strStr()

#28 Easy

Divide Two Integers

#29 Medium

Substring with Concatenation of All Words

#30 Hard

Next Permutation

#31 Medium

Longest Valid Parentheses

#32 Hard

Search in Rotated Sorted Array

#33 Medium

Find First and Last Position of Element in Sorted Array

#34 Medium

Search Insert Position

#35 Easy

Valid Sudoku

#36 Medium

Sudoku Solver

#37 Hard

Count and Say

#38 Medium

Combination Sum

#39 Medium

Combination Sum II

#40 Medium

First Missing Positive

#41 Hard

Trapping Rain Water

#42 Hard

Multiply Strings

#43 Medium

Wildcard Matching

#44 Hard

Jump Game II

#45 Medium

Permutations

#46 Medium

Permutations II

#47 Medium

Rotate Image

#48 Medium

Group Anagrams

#49 Medium

Pow(x, n)

#50 Medium

N-Queens

#51 Hard

N-Queens II

#52 Hard

Maximum Subarray

#53 Easy

Spiral Matrix

#54 Medium

Jump Game

#55 Medium

Merge Intervals

#56 Medium

Insert Interval

#57 Medium

Length of Last Word

#58 Easy

Spiral Matrix II

#59 Medium

Permutation Sequence

#60 Hard

Rotate List

#61 Medium

Unique Paths

#62 Medium

Unique Paths II

#63 Medium

Minimum Path Sum

#64 Medium

Valid Number

#65 Hard

Plus One

#66 Easy

Add Binary

#67 Easy

Text Justification

#68 Hard

Sqrt(x)

#69 Medium

Climbing Stairs

#70 Easy

Simplify Path

#71 Medium

Edit Distance

#72 Medium

Set Matrix Zeroes

#73 Medium

Search a 2D Matrix

#74 Medium

Sort Colors

#75 Medium

Minimum Window Substring

#76 Hard

Combinations

#77 Medium

Subsets

#78 Medium

Word Search

#79 Medium

Remove Duplicates from Sorted Array II

#80 Medium

Search in Rotated Sorted Array II

#81 Medium

Remove Duplicates from Sorted List II

#82 Medium

Remove Duplicates from Sorted List

#83 Easy

Largest Rectangle in Histogram

#84 Hard

Maximal Rectangle

#85 Hard

Partition List

#86 Medium

Scramble String

#87 Hard

Merge Sorted Array

#88 Easy

Gray Code

#89 Medium

Subsets II

#90 Medium

Decode Ways

#91 Medium

Reverse Linked List II

#92 Medium

Restore IP Addresses

#93 Medium

Binary Tree Inorder Traversal

#94 Easy

Unique Binary Search Trees II

#95 Medium

Unique Binary Search Trees

#96 Medium

Interleaving String

#97 Medium

Validate Binary Search Tree

#98 Medium

Recover Binary Search Tree

#99 Medium

Same Tree

#100 Easy

Symmetric Tree

#101 Easy

Binary Tree Level Order Traversal

#102 Medium

Binary Tree Zigzag Level Order Traversal

#103 Medium

Maximum Depth of Binary Tree

#104 Easy

Construct Binary Tree from Preorder and Inorder Traversal

#105 Medium

Construct Binary Tree from Inorder and Postorder Traversal

#106 Medium

Binary Tree Level Order Traversal II

#107 Medium

Convert Sorted Array to Binary Search Tree

#108 Easy

Convert Sorted List to Binary Search Tree

#109 Medium

Balanced Binary Tree

#110 Easy

Minimum Depth of Binary Tree

#111 Easy

Path Sum

#112 Easy

Path Sum II

#113 Medium

Flatten Binary Tree to Linked List

#114 Medium

Distinct Subsequences

#115 Hard

Populating Next Right Pointers in Each Node

#116 Medium

Populating Next Right Pointers in Each Node II

#117 Medium

Pascal's Triangle

#118 Easy

Pascal's Triangle II

#119 Easy

Triangle

#120 Medium

Best Time to Buy and Sell Stock

#121 Easy

Best Time to Buy and Sell Stock II

#122 Medium

Best Time to Buy and Sell Stock III

#123 Hard

Binary Tree Maximum Path Sum

#124 Hard

Valid Palindrome

#125 Easy

Word Ladder II

#126 Hard

Word Ladder

#127 Hard

Longest Consecutive Sequence

#128 Medium

Sum Root to Leaf Numbers

#129 Medium

Surrounded Regions

#130 Medium

Palindrome Partitioning

#131 Medium

Palindrome Partitioning II

#132 Hard

Clone Graph

#133 Medium

Gas Station

#134 Medium

Candy

#135 Hard

Single Number

#136 Easy

Single Number II

#137 Medium

Copy List with Random Pointer

#138 Medium

Word Break

#139 Medium

Word Break II

#140 Hard

Linked List Cycle

#141 Easy

Linked List Cycle II

#142 Medium

Reorder List

#143 Medium

Binary Tree Preorder Traversal

#144 Easy

Binary Tree Postorder Traversal

#145 Easy

LRU Cache

#146 Medium

Insertion Sort List

#147 Medium

Sort List

#148 Medium

Max Points on a Line

#149 Hard

Evaluate Reverse Polish Notation

#150 Medium

Reverse Words in a String

#151 Medium

Maximum Product Subarray

#152 Medium

Find Minimum in Rotated Sorted Array

#153 Medium

Find Minimum in Rotated Sorted Array II

#154 Hard

Min Stack

#155 Medium

Intersection of Two Linked Lists

#160 Medium

Find Peak Element

#162 Medium

Maximum Gap

#164 Medium

Compare Version Numbers

#165 Medium

Fraction to Recurring Decimal

#166 Medium

Two Sum II - Input Array Is Sorted

#167 Easy

Excel Sheet Column Title

#168 Easy

Majority Element

#169 Easy

Excel Sheet Column Number

#171 Easy

Factorial Trailing Zeroes

#172 Medium

Binary Search Tree Iterator

#173 Medium

Dungeon Game

#174 Hard

Largest Number

#179 Medium

Repeated DNA Sequences

#187 Medium

Best Time to Buy and Sell Stock IV

#188 Hard

Rotate Array

#189 Medium

Reverse Bits

#190 Easy

Number of 1 Bits

#191 Easy

House Robber

#198 Medium

Binary Tree Right Side View

#199 Medium

Number of Islands

#200 Medium

Bitwise AND of Numbers Range

#201 Medium

Happy Number

#202 Easy

Remove Linked List Elements

#203 Easy

Count Primes

#204 Medium

Isomorphic Strings

#205 Easy

Reverse Linked List

#206 Easy

Course Schedule

#207 Medium

Implement Trie (Prefix Tree)

#208 Medium

Minimum Size Subarray Sum

#209 Medium

Course Schedule II

#210 Medium

Design Add and Search Words Data Structure

#211 Medium

Word Search II

#212 Hard

House Robber II

#213 Medium

Shortest Palindrome

#214 Hard

Kth Largest Element in an Array

#215 Medium

Combination Sum III

#216 Medium

Contains Duplicate

#217 Easy

The Skyline Problem

#218 Hard

Contains Duplicate II

#219 Easy

Contains Duplicate III

#220 Hard

Maximal Square

#221 Medium

Count Complete Tree Nodes

#222 Easy

Rectangle Area

#223 Medium

Basic Calculator

#224 Hard

Implement Stack using Queues

#225 Easy

Invert Binary Tree

#226 Easy

Basic Calculator II

#227 Medium

Summary Ranges

#228 Easy

Majority Element II

#229 Medium

Kth Smallest Element in a BST

#230 Medium

Power of Two

#231 Easy

Implement Queue using Stacks

#232 Easy

Number of Digit One

#233 Hard

Palindrome Linked List

#234 Easy

Lowest Common Ancestor of a Binary Search Tree

#235 Easy

Lowest Common Ancestor of a Binary Tree

#236 Medium

Delete Node in a Linked List

#237 Easy

Product of Array Except Self

#238 Medium

Sliding Window Maximum

#239 Hard

Search a 2D Matrix II

#240 Medium

Different Ways to Add Parentheses

#241 Medium

Valid Anagram

#242 Easy

Binary Tree Paths

#257 Easy

Add Digits

#258 Easy

Single Number III

#260 Medium

Ugly Number

#263 Easy

Ugly Number II

#264 Medium

Missing Number

#268 Easy

Integer to English Words

#273 Hard

H-Index

#274 Medium

H-Index II

#275 Medium

First Bad Version

#278 Medium

Perfect Squares

#279 Medium

Expression Add Operators

#282 Hard

Move Zeroes

#283 Easy

Peeking Iterator

#284 Medium

Find the Duplicate Number

#287 Medium

Game of Life

#289 Medium

Word Pattern

#290 Easy

Nim Game

#292 Easy

Find Median from Data Stream

#295 Hard

Serialize and Deserialize Binary Tree

#297 Hard

Bulls and Cows

#299 Medium

Longest Increasing Subsequence

#300 Medium

Remove Invalid Parentheses

#301 Hard

Range Sum Query - Immutable

#303 Easy

Range Sum Query 2D - Immutable

#304 Medium

Additive Number

#306 Medium

Range Sum Query - Mutable

#307 Medium

Best Time to Buy and Sell Stock with Cooldown

#309 Medium

Minimum Height Trees

#310 Medium

Burst Balloons

#312 Hard

Super Ugly Number

#313 Medium

Count of Smaller Numbers After Self

#315 Hard

Remove Duplicate Letters

#316 Medium

Maximum Product of Word Lengths

#318 Medium

Bulb Switcher

#319 Medium

Create Maximum Number

#321 Hard

Coin Change

#322 Medium

Wiggle Sort II

#324 Medium

Power of Three

#326 Easy

Count of Range Sum

#327 Hard

Odd Even Linked List

#328 Medium

Longest Increasing Path in a Matrix

#329 Hard

Patching Array

#330 Hard

Verify Preorder Serialization of a Binary Tree

#331 Medium

Reconstruct Itinerary

#332 Hard

Increasing Triplet Subsequence

#334 Medium

Self Crossing

#335 Hard

Palindrome Pairs

#336 Hard

House Robber III

#337 Medium

Counting Bits

#338 Easy

Flatten Nested List Iterator

#341 Medium

Power of Four

#342 Easy

Integer Break

#343 Medium

Reverse String

#344 Easy

Reverse Vowels of a String

#345 Easy

Top K Frequent Elements

#347 Medium

Intersection of Two Arrays

#349 Easy

Intersection of Two Arrays II

#350 Easy

Data Stream as Disjoint Intervals

#352 Hard

Russian Doll Envelopes

#354 Hard

Design Twitter

#355 Medium

Count Numbers with Unique Digits

#357 Medium

Max Sum of Rectangle No Larger Than K

#363 Hard

Water and Jug Problem

#365 Medium

Valid Perfect Square

#367 Easy

Largest Divisible Subset

#368 Medium

Sum of Two Integers

#371 Medium

Super Pow

#372 Medium

Find K Pairs with Smallest Sums

#373 Medium

Guess Number Higher or Lower

#374 Medium

Guess Number Higher or Lower II

#375 Medium

Wiggle Subsequence

#376 Medium

Combination Sum IV

#377 Medium

Kth Smallest Element in a Sorted Matrix

#378 Medium

Insert Delete GetRandom O(1)

#380 Medium

Insert Delete GetRandom O(1) - Duplicates allowed

#381 Hard

Linked List Random Node

#382 Medium

Ransom Note

#383 Easy

Shuffle an Array

#384 Medium

Mini Parser

#385 Medium

Lexicographical Numbers

#386 Medium

First Unique Character in a String

#387 Easy

Longest Absolute File Path

#388 Medium

Find the Difference

#389 Easy

Elimination Game

#390 Medium

Perfect Rectangle

#391 Hard

Is Subsequence

#392 Easy

UTF-8 Validation

#393 Medium

Decode String

#394 Medium

Longest Substring with At Least K Repeating Characters

#395 Medium

Rotate Function

#396 Medium

Integer Replacement

#397 Medium

Random Pick Index

#398 Medium

Evaluate Division

#399 Medium

Nth Digit

#400 Medium

Binary Watch

#401 Easy

Remove K Digits

#402 Medium

Frog Jump

#403 Hard

Sum of Left Leaves

#404 Easy

Convert a Number to Hexadecimal

#405 Easy

Queue Reconstruction by Height

#406 Medium

Trapping Rain Water II

#407 Hard

Longest Palindrome

#409 Easy

Split Array Largest Sum

#410 Hard

Fizz Buzz

#412 Easy

Arithmetic Slices

#413 Medium

Third Maximum Number

#414 Easy

Add Strings

#415 Easy

Partition Equal Subset Sum

#416 Medium

Pacific Atlantic Water Flow

#417 Medium

Battleships in a Board

#419 Medium

Strong Password Checker

#420 Hard

Maximum XOR of Two Numbers in an Array

#421 Medium

Reconstruct Original Digits from English

#423 Medium

Longest Repeating Character Replacement

#424 Medium

Construct Quad Tree

#427 Medium

N-ary Tree Level Order Traversal

#429 Medium

Flatten a Multilevel Doubly Linked List

#430 Medium

All O`one Data Structure

#432 Hard

Minimum Genetic Mutation

#433 Medium

Number of Segments in a String

#434 Easy

Non-overlapping Intervals

#435 Medium

Find Right Interval

#436 Medium

Path Sum III

#437 Medium

Find All Anagrams in a String

#438 Medium

K-th Smallest in Lexicographical Order

#440 Hard

Arranging Coins

#441 Easy

Find All Duplicates in an Array

#442 Medium

String Compression

#443 Medium

Add Two Numbers II

#445 Medium

Arithmetic Slices II - Subsequence

#446 Hard

Number of Boomerangs

#447 Medium

Find All Numbers Disappeared in an Array

#448 Easy

Serialize and Deserialize BST

#449 Medium

Delete Node in a BST

#450 Medium

Sort Characters By Frequency

#451 Medium

Minimum Number of Arrows to Burst Balloons

#452 Medium

Minimum Moves to Equal Array Elements

#453 Medium

4Sum II

#454 Medium

Assign Cookies

#455 Easy

132 Pattern

#456 Medium

Circular Array Loop

#457 Medium

Poor Pigs

#458 Hard

Repeated Substring Pattern

#459 Easy

LFU Cache

#460 Hard

Hamming Distance

#461 Easy

Minimum Moves to Equal Array Elements II

#462 Medium

Island Perimeter

#463 Medium

Can I Win

#464 Medium

Count The Repetitions

#466 Hard

Unique Substrings in Wraparound String

#467 Medium

Validate IP Address

#468 Medium

Implement Rand10() Using Rand7()

#470 Medium

Concatenated Words

#472 Hard

Matchsticks to Square

#473 Medium

Ones and Zeroes

#474 Medium

Heaters

#475 Medium

Number Complement

#476 Easy

Total Hamming Distance

#477 Medium

Generate Random Point in a Circle

#478 Medium

Largest Palindrome Product

#479 Hard

Sliding Window Median

#480 Hard

Magical String

#481 Medium

License Key Formatting

#482 Easy

Smallest Good Base

#483 Hard

Max Consecutive Ones

#485 Easy

Predict the Winner

#486 Medium

Zuma Game

#488 Hard

Non-decreasing Subsequences

#491 Medium

Construct the Rectangle

#492 Easy

Reverse Pairs

#493 Hard

Target Sum

#494 Medium

Teemo Attacking

#495 Easy

Next Greater Element I

#496 Easy

Random Point in Non-overlapping Rectangles

#497 Medium

Diagonal Traverse

#498 Medium

Keyboard Row

#500 Easy

Find Mode in Binary Search Tree

#501 Easy

IPO

#502 Hard

Next Greater Element II

#503 Medium

Base 7

#504 Easy

Relative Ranks

#506 Easy

Perfect Number

#507 Easy

Most Frequent Subtree Sum

#508 Medium

Fibonacci Number

#509 Easy

Find Bottom Left Tree Value

#513 Medium

Freedom Trail

#514 Hard

Find Largest Value in Each Tree Row

#515 Medium

Longest Palindromic Subsequence

#516 Medium

Super Washing Machines

#517 Hard

Coin Change II

#518 Medium

Random Flip Matrix

#519 Medium

Detect Capital

#520 Easy

Longest Uncommon Subsequence I

#521 Easy

Longest Uncommon Subsequence II

#522 Medium

Continuous Subarray Sum

#523 Medium

Longest Word in Dictionary through Deleting

#524 Medium

Contiguous Array

#525 Medium

Beautiful Arrangement

#526 Medium

Random Pick with Weight

#528 Medium

Minesweeper

#529 Medium

Minimum Absolute Difference in BST

#530 Easy

K-diff Pairs in an Array

#532 Medium

Complex Number Multiplication

#537 Medium

Convert BST to Greater Tree

#538 Medium

Minimum Time Difference

#539 Medium

Single Element in a Sorted Array

#540 Medium

Reverse String II

#541 Easy

01 Matrix

#542 Medium

Diameter of Binary Tree

#543 Easy

Remove Boxes

#546 Hard

Number of Provinces

#547 Medium

Student Attendance Record I

#551 Easy

Student Attendance Record II

#552 Hard

Optimal Division

#553 Medium

Brick Wall

#554 Medium

Next Greater Element III

#556 Medium

Reverse Words in a String III

#557 Easy

Logical OR of Two Binary Grids Represented as Quad-Trees

#558 Medium

Maximum Depth of N-ary Tree

#559 Easy

Subarray Sum Equals K

#560 Medium

Binary Tree Tilt

#563 Easy

Find the Closest Palindrome

#564 Hard

Array Nesting

#565 Medium

Reshape the Matrix

#566 Easy

Permutation in String

#567 Medium

Subtree of Another Tree

#572 Easy

Distribute Candies

#575 Easy

Out of Boundary Paths

#576 Medium

Shortest Unsorted Continuous Subarray

#581 Medium

Delete Operation for Two Strings

#583 Medium

Erect the Fence

#587 Hard

N-ary Tree Preorder Traversal

#589 Easy

N-ary Tree Postorder Traversal

#590 Easy

Tag Validator

#591 Hard

Fraction Addition and Subtraction

#592 Medium

Valid Square

#593 Medium

Longest Harmonious Subsequence

#594 Easy

Range Addition II

#598 Easy

Minimum Index Sum of Two Lists

#599 Easy

Non-negative Integers without Consecutive Ones

#600 Hard

Can Place Flowers

#605 Easy

Construct String from Binary Tree

#606 Easy

Find Duplicate File in System

#609 Medium

Valid Triangle Number

#611 Medium

Merge Two Binary Trees

#617 Easy

Task Scheduler

#621 Medium

Design Circular Queue

#622 Medium

Add One Row to Tree

#623 Medium

Maximum Distance in Arrays

#624 Medium

Maximum Product of Three Numbers

#628 Easy

K Inverse Pairs Array

#629 Hard

Course Schedule III

#630 Hard

Sum of Square Numbers

#633 Medium

Exclusive Time of Functions

#636 Medium

Average of Levels in Binary Tree

#637 Easy

Shopping Offers

#638 Medium

Decode Ways II

#639 Hard

Design Circular Deque

#641 Medium

Maximum Average Subarray I

#643 Easy

Set Mismatch

#645 Medium

Maximum Length of Pair Chain

#646 Medium

Palindromic Substrings

#647 Medium

Replace Words

#648 Medium

Dota2 Senate

#649 Medium

2 Keys Keyboard

#650 Medium

Find Duplicate Subtrees

#652 Medium

Two Sum IV - Input is a BST

#653 Easy

Maximum Binary Tree

#654 Medium

Print Binary Tree

#655 Medium

Robot Return to Origin

#657 Easy

Find K Closest Elements

#658 Medium

Split Array into Consecutive Subsequences

#659 Medium

Image Smoother

#661 Easy

Maximum Width of Binary Tree

#662 Medium

Strange Printer

#664 Hard

Beautiful Arrangement II

#667 Medium

Kth Smallest Number in Multiplication Table

#668 Hard

Trim a Binary Search Tree

#669 Medium

Maximum Swap

#670 Medium

Second Minimum Node In a Binary Tree

#671 Easy

Bulb Switcher II

#672 Medium

Number of Longest Increasing Subsequence

#673 Medium

Longest Continuous Increasing Subsequence

#674 Easy

Cut Off Trees for Golf Event

#675 Hard

Implement Magic Dictionary

#676 Medium

Map Sum Pairs

#677 Medium

Valid Parenthesis String

#678 Medium

24 Game

#679 Hard

Valid Palindrome II

#680 Easy

Baseball Game

#682 Easy

Redundant Connection

#684 Medium

Redundant Connection II

#685 Hard

Repeated String Match

#686 Easy

Longest Univalue Path

#687 Medium

Knight Probability in Chessboard

#688 Medium

Maximum Sum of 3 Non-Overlapping Subarrays

#689 Hard

Employee Importance

#690 Medium

Binary Number with Alternating Bits

#693 Easy

Max Area of Island

#695 Medium

Count Binary Substrings

#696 Easy

Degree of an Array

#697 Easy

Search in a Binary Search Tree

#700 Easy

Insert into a Binary Search Tree

#701 Medium

Kth Largest Element in a Stream

#703 Easy

Binary Search

#704 Easy

Design HashSet

#705 Easy

Design HashMap

#706 Easy

Subarray Product Less Than K

#713 Medium

Best Time to Buy and Sell Stock with Transaction Fee

#714 Medium

1-bit and 2-bit Characters

#717 Easy

Longest Word in Dictionary

#720 Medium

Remove Comments

#722 Medium

Find Pivot Index

#724 Easy

Flood Fill

#733 Easy

Asteroid Collision

#735 Medium

Daily Temperatures

#739 Medium

Network Delay Time

#743 Medium

Find Smallest Letter Greater Than Target

#744 Easy

Prefix and Suffix Search

#745 Hard

Min Cost Climbing Stairs

#746 Easy

Largest Number At Least Twice of Others

#747 Easy

Shortest Completing Word

#748 Easy

Prime Number of Set Bits in Binary Representation

#762 Easy

Partition Labels

#763 Medium

Minimum Distance Between BST Nodes

#783 Easy

Letter Case Permutation

#784 Medium

Domino and Tromino Tiling

#790 Medium

Custom Sort String

#791 Medium

Rotate String

#796 Easy

Find Eventual Safe States

#802 Medium

Unique Morse Code Words

#804 Easy

Most Common Word

#819 Easy

Shortest Distance to a Character

#821 Easy

Goat Latin

#824 Easy

Making A Large Island

#827 Hard

Positions of Large Groups

#830 Easy

Masking Personal Information

#831 Medium

Keys and Rooms

#841 Medium

Backspace String Compare

#844 Easy

Hand of Straights

#846 Medium

Transpose Matrix

#867 Easy

Binary Gap

#868 Easy

Leaf-Similar Trees

#872 Easy

Length of Longest Fibonacci Subsequence

#873 Medium

Koko Eating Bananas

#875 Medium

Middle of the Linked List

#876 Easy

Uncommon Words from Two Sentences

#884 Easy

Construct Binary Tree from Preorder and Postorder Traversal

#889 Medium

Find and Replace Pattern

#890 Medium

Online Stock Span

#901 Medium

Sort Array By Parity

#905 Easy

Snakes and Ladders

#909 Medium

Sort an Array

#912 Medium

X of a Kind in a Deck of Cards

#914 Medium

Word Subsets

#916 Medium

Maximum Sum Circular Subarray

#918 Medium

Sort Array By Parity II

#922 Easy

Long Pressed Name

#925 Easy

Flip String to Monotone Increasing

#926 Medium

Unique Email Addresses

#929 Easy

Number of Recent Calls

#933 Easy

Reorder Data in Log Files

#937 Medium

Vowel Spellchecker

#966 Medium

Powerful Integers

#970 Easy

Largest Perimeter Triangle

#976 Easy

Squares of a Sorted Array

#977 Easy

Sum of Even Numbers After Queries

#985 Easy

Add to Array-Form of Integer

#989 Easy

Rotting Oranges

#994 Medium

Find the Town Judge

#997 Easy

Find Common Characters

#1002 Easy

Max Consecutive Ones III

#1004 Medium

Maximize Sum Of Array After K Negations

#1005 Easy

Complement of Base 10 Integer

#1009 Easy

Pairs of Songs With Total Durations Divisible by 60

#1010 Medium

Sum of Root To Leaf Binary Numbers

#1022 Easy

Camelcase Matching

#1023 Medium

Recover a Tree From Preorder Traversal

#1028 Hard

Valid Boomerang

#1037 Easy

Binary Search Tree to Greater Sum Tree

#1038 Medium

Robot Bounded In Circle

#1041 Medium

Remove All Adjacent Duplicates In String

#1047 Easy

Height Checker

#1051 Easy

Greatest Common Divisor of Strings

#1071 Easy

Letter Tile Possibilities

#1079 Medium

Smallest Subsequence of Distinct Characters

#1081 Medium

Shortest Common Supersequence

#1092 Hard

Distribute Candies to People

#1103 Easy

Defanging an IP Address

#1108 Easy

Relative Sort Array

#1122 Easy

N-th Tribonacci Number

#1137 Easy

Longest Common Subsequence

#1143 Medium

Maximum Level Sum of a Binary Tree

#1161 Medium

Maximum Number of Balloons

#1189 Easy

Minimum Absolute Difference

#1200 Easy

Design Skiplist

#1206 Hard

Unique Number of Occurrences

#1207 Easy

Get Equal Substrings Within Budget

#1208 Medium

Minimum Cost to Move Chips to The Same Position

#1217 Easy

Check If It Is a Straight Line

#1232 Easy

Remove Sub-Folders from the Filesystem

#1233 Medium

Minimum Remove to Make Valid Parentheses

#1249 Medium

Cells with Odd Values in a Matrix

#1252 Easy

Find Elements in a Contaminated Binary Tree

#1261 Medium

Count Servers that Communicate

#1267 Medium

Search Suggestions System

#1268 Medium

Element Appearing More Than 25% In Sorted Array

#1287 Easy

Convert Binary Number in a Linked List to Integer

#1290 Easy

Sequential Digits

#1291 Medium

Maximum Side Length of a Square with Sum Less than or Equal to Threshold

#1292 Medium

Find Numbers with Even Number of Digits

#1295 Easy

Divide Array in Sets of K Consecutive Numbers

#1296 Medium

Maximum Number of Occurrences of a Substring

#1297 Medium

Find N Unique Integers Sum up to Zero

#1304 Easy

Decrypt String from Alphabet to Integer Mapping

#1309 Easy

Decompress Run-Length Encoded List

#1313 Easy

Convert Integer to the Sum of Two No-Zero Integers

#1317 Easy

Minimum Flips to Make a OR b Equal to c

#1318 Medium

Number of Operations to Make Network Connected

#1319 Medium

Maximum 69 Number

#1323 Easy

Print Words Vertically

#1324 Medium

Rank Transform of an Array

#1331 Easy

Remove Palindromic Subsequences

#1332 Easy

Filter Restaurants by Vegan-Friendly, Price and Distance

#1333 Medium

Number of Steps to Reduce a Number to Zero

#1342 Easy

Count Negative Numbers in a Sorted Matrix

#1351 Easy

Product of the Last K Numbers

#1352 Medium

Sort Integers by The Number of 1 Bits

#1356 Easy

Number of Days Between Two Dates

#1360 Easy

How Many Numbers Are Smaller Than the Current Number

#1365 Easy

Rank Teams by Votes

#1366 Medium

Minimum Cost to Make at Least One Valid Path in a Grid

#1368 Hard

Longest ZigZag Path in a Binary Tree

#1372 Medium

Generate a String With Characters That Have Odd Counts

#1374 Easy

Lucky Numbers in a Matrix

#1380 Easy

Create Target Array in the Given Order

#1389 Easy

Construct K Palindrome Strings

#1400 Medium

Reducing Dishes

#1402 Hard

String Matching in an Array

#1408 Easy

HTML Entity Parser

#1410 Medium

The k-th Lexicographical String of All Happy Strings of Length n

#1415 Medium

Kids With the Greatest Number of Candies

#1431 Easy

Destination City

#1436 Easy

Check If All 1's Are at Least Length K Places Away

#1437 Easy

Minimum Time to Collect All Apples in a Tree

#1443 Medium

Consecutive Characters

#1446 Easy

Simplified Fractions

#1447 Medium

Count Good Nodes in Binary Tree

#1448 Medium

Number of Students Doing Homework at a Given Time

#1450 Easy

Rearrange Words in a Sentence

#1451 Medium

Check If a Word Occurs As a Prefix of Any Word in a Sentence

#1455 Easy

Maximum Number of Vowels in a Substring of Given Length

#1456 Medium

Make Two Arrays Equal by Reversing Sub-arrays

#1460 Easy

Course Schedule IV

#1462 Medium

Maximum Product of Two Elements in an Array

#1464 Easy

Reorder Routes to Make All Paths Lead to the City Zero

#1466 Medium

Shuffle the Array

#1470 Easy

Design Browser History

#1472 Medium

Final Prices With a Special Discount in a Shop

#1475 Easy

Running Sum of 1d Array

#1480 Easy

Least Number of Unique Integers after K Removals

#1481 Medium

XOR Operation in an Array

#1486 Easy

Average Salary Excluding the Minimum and Maximum Salary

#1491 Easy

The kth Factor of n

#1492 Medium

Longest Subarray of 1's After Deleting One Element

#1493 Medium

Path Crossing

#1496 Easy

Can Make Arithmetic Progression From Sequence

#1502 Easy

Reformat Date

#1507 Easy

Number of Good Pairs

#1512 Easy

Number of Nodes in the Sub-Tree With the Same Label

#1519 Medium

Number of Sub-arrays With Odd Sum

#1524 Medium

Shuffle String

#1528 Easy

Find the Winner of an Array Game

#1535 Medium

Three Consecutive Odds

#1550 Easy

Minimum Operations to Make Array Equal

#1551 Medium

Detect Pattern of Length M Repeated K or More Times

#1566 Easy

Replace All ?'s to Avoid Consecutive Repeating Characters

#1576 Medium

Crawler Log Folder

#1598 Easy

Determine if Two Strings Are Close

#1657 Medium

Maximum Repeating Substring

#1668 Easy

Merge In Between Linked Lists

#1669 Medium

Richest Customer Wealth

#1672 Easy

Max Number of K-Sum Pairs

#1679 Medium

Calculate Money in Leetcode Bank

#1716 Easy

Construct the Lexicographically Largest Valid Sequence

#1718 Medium

Tuple with Same Product

#1726 Medium

Find the Highest Altitude

#1732 Easy

Sum of Unique Elements

#1748 Easy

Maximum Absolute Sum of Any Subarray

#1749 Medium

Check if Array Is Sorted and Rotated

#1752 Easy

Form Array by Concatenating Subarrays of Another Array

#1764 Medium

Map of Highest Peak

#1765 Medium

Merge Strings Alternately

#1768 Easy

Minimum Number of Operations to Move All Balls to Each Box

#1769 Medium

Check if Number is a Sum of Powers of Three

#1780 Medium

Check if One String Swap Can Make Strings Equal

#1790 Easy

Find Center of Star Graph

#1791 Easy

Maximum Ascending Subarray Sum

#1800 Easy

Determine Color of a Chessboard Square

#1812 Easy

Finding the Users Active Minutes

#1817 Medium

Check if the Sentence Is Pangram

#1832 Easy

Maximum Ice Cream Bars

#1833 Medium

Check if Word Equals Summation of Two Words

#1880 Easy

Determine Whether Matrix Can Be Obtained By Rotation

#1886 Easy

Remove All Occurrences of a Substring

#1910 Medium

Build Array from Permutation

#1920 Easy

Nearest Exit from Entrance in Maze

#1926 Medium

Concatenation of Array

#1929 Easy

Unique Length-3 Palindromic Subsequences

#1930 Medium

Maximum Number of Words You Can Type

#1935 Easy

Find Unique Binary String

#1980 Medium

Find the Kth Largest Integer in the Array

#1985 Medium

The Number of Weak Characters in the Game

#1996 Medium

Reverse Prefix of Word

#2000 Easy

Final Value of Variable After Performing Operations

#2011 Easy

Maximum Difference Between Increasing Elements

#2016 Easy

Grid Game

#2017 Medium

Minimum Moves to Convert String

#2027 Easy

Minimum Number of Moves to Seat Everyone

#2037 Easy

Number of Valid Words in a Sentence

#2047 Easy

Kth Distinct String in an Array

#2053 Medium

Count Common Words With One Occurrence

#2085 Easy

Delete the Middle Node of a Linked List

#2095 Medium

Find Subsequence of Length K With the Largest Sum

#2099 Medium

Maximum Number of Words Found in Sentences

#2114 Easy

Check if a Parentheses String Can Be Valid

#2116 Medium

Maximum Employees to Be Invited to a Meeting

#2127 Hard

Capitalize the Title

#2129 Easy

Maximum Twin Sum of a Linked List

#2130 Medium

Keep Multiplying Found Values by Two

#2154 Easy

Partition Array According to Given Pivot

#2161 Medium

Counting Words With a Given Prefix

#2185 Easy

Find the Difference of Two Arrays

#2215 Easy

Add Two Integers

#2235 Easy

Minimum Rounds to Complete All Tasks

#2244 Medium

Number of Ways to Split Array

#2270 Medium

Successful Pairs of Spells and Potions

#2300 Medium

Smallest Number in Infinite Set

#2336 Medium

Max Sum of a Pair With Equal Sum of Digits

#2342 Medium

Design a Number Container System

#2349 Medium

Equal Row and Column Pairs

#2352 Medium

Count Number of Bad Pairs

#2364 Medium

Construct Smallest Number From DI String

#2375 Medium

Minimum Recolors to Get K Consecutive Black Blocks

#2379 Easy

Shifting Letters II

#2381 Medium

Removing Stars From a String

#2390 Medium

Strictly Palindromic Number

#2396 Medium

Smallest Even Multiple

#2413 Easy

Bitwise XOR of All Pairings

#2425 Medium

Number of Common Factors

#2427 Easy

Minimize XOR

#2429 Medium

Apply Operations to an Array

#2460 Easy

Total Cost to Hire K Workers

#2462 Medium

Most Profitable Path in a Tree

#2467 Medium

Convert the Temperature

#2469 Easy

Difference Between Ones and Zeros in Row and Column

#2482 Medium

Circular Sentence

#2490 Easy

Divide Nodes Into the Maximum Number of Groups

#2493 Hard

Closest Prime Numbers in Range

#2523 Medium

Maximum Count of Positive Integer and Negative Integer

#2529 Easy

Difference Between Element Sum and Digit Sum of an Array

#2535 Easy

Maximum Subsequence Score

#2542 Medium

Count Vowel Strings in Ranges

#2559 Medium

Merge Two 2D Arrays by Summing Values

#2570 Easy

Count Total Number of Colored Cells

#2579 Medium

Check if Object Instance of Class

#2618 Medium

Array Prototype Last

#2619 Easy

Counter

#2620 Easy

Sleep

#2621 Easy

Cache With Time Limit

#2622 Medium

Memoize

#2623 Medium

Flatten Deeply Nested Array

#2625 Medium

Array Reduce Transformation

#2626 Easy

Debounce

#2627 Medium

Function Composition

#2629 Easy

Memoize II

#2630 Hard

Group By

#2631 Medium

Filter Elements from Array

#2634 Easy

Apply Transform Over Each Element in Array

#2635 Easy

Promise Time Limit

#2637 Medium

Generate Fibonacci Sequence

#2648 Easy

Nested Array Generator

#2649 Medium

Design Cancellable Function

#2650 Hard

Find the Prefix Common Array of Two Arrays

#2657 Medium

Maximum Number of Fish in a Grid

#2658 Medium

First Completely Painted Row or Column

#2661 Medium

Counter II

#2665 Easy

Allow One Function Call

#2666 Easy

Create Hello World Function

#2667 Easy

Chunk Array

#2677 Easy

Neighboring Bitwise XOR

#2683 Medium

Call Function with Custom Context

#2693 Medium

Event Emitter

#2694 Medium

Array Wrapper

#2695 Easy

Find the Punishment Number of an Integer

#2698 Medium

Return Length of Arguments Passed

#2703 Easy

To Be Or Not To Be

#2704 Easy

Compact Object

#2705 Medium

Timeout Cancellation

#2715 Easy

Execute Asynchronous Functions in Parallel

#2721 Medium

Join Two Arrays by ID

#2722 Medium

Add Two Promises

#2723 Easy

Sort By

#2724 Easy

Interval Cancellation

#2725 Easy

Calculator with Method Chaining

#2726 Easy

Is Object Empty

#2727 Easy

Make Lexicographically Smallest Array by Swapping Elements

#2948 Medium

Find Missing and Repeated Values

#2965 Easy

Count Prefix and Suffix Pairs I

#3042 Easy

Minimum Operations to Exceed Threshold Value II

#3066 Medium

Longest Strictly Increasing or Strictly Decreasing Subarray

#3105 Easy

Score of a String

#3110 Easy

Special Array I

#3151 Easy

Find the Number of Distinct Colors Among the Balls

#3160 Medium

Clear Digits

#3174 Easy

Alternating Groups II

#3208 Medium

Minimum Length of String After Operations

#3223 Medium

Count of Substrings Containing Every Vowel and K Consonants II

#3306 Medium

Count Subarrays of Length Three With a Condition

#3392 Easy

Minimum Number of Operations to Make Elements in Array Distinct

#3396 Easy

Maximum Number of Distinct Elements After Operations

#3397 Medium

Minimum Operations to Make Columns Strictly Increasing

#3402 Easy

Sum of Good Numbers

#3452 Easy

Check If Digits Are Equal in String After Operations I

#3461 Easy

Maximum Sum With at Most K Elements

#3462 Medium

Check If Digits Are Equal in String After Operations II

#3463 Hard