Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Amazon — 180 Days

Problem List

Two Sum

Lru Cache

Longest Substring Without Repeating Characters

Number Of Islands

Best Time To Buy And Sell Stock

Longest Palindromic Substring

Trapping Rain Water

Add Two Numbers

Reorganize String

Group Anagrams

Container With Most Water

Merge Intervals

Subarray Sum Equals K

Koko Eating Bananas

Median Of Two Sorted Arrays

Palindrome Number

3sum

Valid Parentheses

Course Schedule

Maximum Subarray

Rotting Oranges

Longest Common Prefix

Top K Frequent Elements

Lowest Common Ancestor Of A Binary Tree

Generate Parentheses

Merge K Sorted Lists

Word Search

Maximum Frequency After Subarray Operation

Next Permutation

Search In Rotated Sorted Array

Longest Consecutive Sequence

Copy List With Random Pointer

Find Peak Element

House Robber

Find First And Last Position Of Element In Sorted Array

Search A 2d Matrix

Roman To Integer

Merge Two Sorted Lists

Minimum Window Substring

Majority Element

Product Of Array Except Self

Jump Game

Merge Sorted Array

Pascals Triangle

Course Schedule Ii

Jump Game Ii

N Queens

Meeting Rooms Ii

Analyze User Website Visit Pattern

Reverse Integer

Binary Tree Maximum Path Sum

Single Element In A Sorted Array

Remove Duplicates From Sorted Array

Edit Distance

Word Ladder

Capacity To Ship Packages Within D Days

Letter Combinations Of A Phone Number

Spiral Matrix

Climbing Stairs

Reverse Linked List

Sliding Window Maximum

Find Median From Data Stream

Coin Change

Insert Delete Getrandom O1

Longest Repeating Character Replacement

Minimum Number Of Primes To Sum To Target

Reverse Nodes In K Group

Single Number

Min Stack

Asteroid Collision

Valid Sudoku

Rotate Image

Kth Largest Element In An Array

Valid Anagram

Find The Duplicate Number

Flood Fill

Remove Element

First Missing Positive

Unique Paths

Largest Rectangle In Histogram

Binary Tree Level Order Traversal

Best Time To Buy And Sell Stock Ii

Candy

Missing Number

Fruit Into Baskets

Search Insert Position

Serialize And Deserialize Binary Tree

Pacific Atlantic Water Flow

Concatenated Words

String To Integer Atoi

Sort Colors

Binary Tree Zigzag Level Order Traversal

Word Break

Rotate Array

Contains Duplicate

String Compression

Next Greater Element Ii

Regular Expression Matching

Sudoku Solver

Combination Sum

Word Break Ii

Reverse Words In A String

Largest Number

Binary Tree Right Side View

Move Zeroes

Evaluate Division

Max Consecutive Ones Iii

Zigzag Conversion

Permutations

Populating Next Right Pointers In Each Node

Surrounded Regions

Combine Two Tables

Happy Number

Word Search Ii

Odd Even Linked List

Intersection Of Two Arrays

Diameter Of Binary Tree

Daily Temperatures

Integer To Roman

Set Matrix Zeroes

Validate Binary Search Tree

Balanced Binary Tree

Gas Station

Linked List Cycle

House Robber Iii

Lfu Cache

Next Greater Element I

Maximum K To Sort A Permutation

Minimum Time To Complete All Deliveries

4sum

Find The Index Of The First Occurrence In A String

Add Binary

Subsets

Maximal Rectangle

Construct Binary Tree From Preorder And Inorder Traversal

Employees Earning More Than Their Managers

Invert Binary Tree

Decode String

Trapping Rain Water Ii

Partition Equal Subset Sum

All Nodes Distance K In Binary Tree

Middle Of The Linked List

Maximum Profit In Job Scheduling

Rotate List

Remove Duplicates From Sorted Array Ii

Same Tree

Palindrome Partitioning

Two Sum Ii Input Array Is Sorted

Contains Duplicate Ii

Maximal Square

Basic Calculator

Majority Element Ii

Palindrome Linked List

Integer To English Words

First Unique Character In A String

Split Array Largest Sum

Fizz Buzz

Diagonal Traverse

Task Scheduler

Palindromic Substrings

Article Views I

Recyclable And Low Fat Products

Frequency Of The Most Frequent Element

Maximize Ysum By Picking A Triplet Of Distinct Xvalues

Process String With Special Operations I

Powx N

Sqrtx

Simplify Path

Sort List

Maximum Product Subarray

Second Highest Salary

Number Of Connected Components In An Undirected Graph

Assign Cookies

Number Of Provinces

Rotate String

K Closest Points To Origin

Time Based Key Value Store

Vertical Order Traversal Of A Binary Tree

Check If Array Is Sorted And Rotated

Confirmation Rate

Create Hello World Function

Count Zero Request Servers

Find The Median Of The Uniqueness Array

3sum Closest

Remove Nth Node From End Of List

Longest Valid Parentheses

Text Justification

Decode Ways

Reverse Linked List Ii

Recover Binary Search Tree

Convert Sorted Array To Binary Search Tree

Evaluate Reverse Polish Notation

Rising Temperature

Minimum Size Subarray Sum

Kth Smallest Element In A Bst

Design Tic Tac Toe

Find K Pairs With Smallest Sums

Remove K Digits

Target Sum

Fibonacci Number

Random Pick With Weight

Managers With At Least 5 Direct Reports

Maximum Width Of Binary Tree

Max Area Of Island

Binary Search

Open The Lock

Peak Index In A Mountain Array

Online Stock Span

Maximum Number Of Events That Can Be Attended

Replace Employee Id With The Unique Identifier

Maximum Number Of Vowels In A Substring Of Given Length

Avoid Flood In The City

Sum Of Subarray Ranges

Divide Two Integers

Minimum Path Sum

Combinations

Remove Duplicates From Sorted List

Unique Binary Search Trees

Distinct Subsequences

Single Number Ii

Reorder List

Binary Search Tree Iterator

Dungeon Game

Isomorphic Strings

House Robber Ii

Implement Stack Using Queues

Power Of Two

Delete Node In A Linked List

Longest Increasing Subsequence

Russian Doll Envelopes

Predict The Winner

Reverse Pairs

01 Matrix

Design In Memory File System

Course Schedule Iii

Find Eventual Safe States

Making A Large Island

Sum Of Subarray Minimums

Snakes And Ladders

Minimum Falling Path Sum

Unique Number Of Occurrences

Count Square Submatrices With All Ones

Maximum Points You Can Obtain From Cards

Longest Continuous Subarray With Absolute Diff Less Than Or Equal To Limit

Design Parking System

Furthest Building You Can Reach

Average Time Of Process Per Machine

Plates Between Candles

Fruits Into Baskets Ii

Substring With Concatenation Of All Words

Length Of Last Word

Subsets Ii

Binary Tree Inorder Traversal

Maximum Depth Of Binary Tree

Triangle

Valid Palindrome

Rank Scores

Count Primes

Implement Trie Prefix Tree

Basic Calculator Ii

Lowest Common Ancestor Of A Binary Search Tree

Search A 2d Matrix Ii

Find The Celebrity

Game Of Life

Design Hit Counter

Is Subsequence

All Oone Data Structure

Minimum Genetic Mutation

Non Overlapping Intervals

Repeated Substring Pattern

Max Consecutive Ones

Longest Harmonious Subsequence

Big Countries

Valid Triangle Number

Exclusive Time Of Functions

Maximum Average Subarray I

Find K Closest Elements

Valid Palindrome Ii

Top K Frequent Words

Partition Labels

Swim In Rising Water

Cheapest Flights Within K Stops

Soup Servings

Bus Routes

Boats To Save People

Binary Tree Cameras

Subarrays With K Different Integers

Largest 1 Bordered Square

Maximum Subarray Sum With One Deletion

Search Suggestions System

Minimum Number Of Days To Make M Bouquets

Min Cost To Connect All Points

Maximum Erasure Value

Maximum Units On A Truck

Maximum Difference Between Increasing Elements

Find All Possible Recipes From Given Supplies

Minimum Difference In Sums After Removal Of Elements

Amount Of Time For Binary Tree To Be Infected

Lexicographically Minimum String After Removing Stars

Find The Minimum Area To Cover All Ones Ii

Count Bowl Subarrays

Swap Nodes In Pairs

N Queens Ii

Spiral Matrix Ii

Plus One

Scramble String

Clone Graph

Linked List Cycle Ii

Find Minimum In Rotated Sorted Array

Intersection Of Two Linked Lists

Delete Duplicate Emails

Remove Linked List Elements

Ugly Number

Alien Dictionary

First Bad Version

Range Sum Query Immutable

Remove Duplicate Letters

Power Of Three

Reverse String

Insert Delete Getrandom O1 Duplicates Allowed

Ransom Note

Heaters

Permutation In String

Find Customer Referee

Design Circular Queue

Smallest Range Covering Elements From K Lists

Kth Largest Element In A Stream

Find Pivot Index

Min Cost Climbing Stairs

Maximize Distance To Closest Person

Car Fleet

Minimum Add To Make Parentheses Valid

Subarray Sums Divisible By K

Customers Who Bought All Products

Last Stone Weight

Product Sales Analysis Iii

Shortest Common Supersequence

Critical Connections In A Network

Monthly Transactions I

Average Selling Price

Find N Unique Integers Sum Up To Zero

Magnetic Force Between Two Balls

Customer Who Visited But Did Not Make Any Transactions

Lowest Common Ancestor Of A Binary Tree Iii

Merge Strings Alternately

Count Good Numbers

Minimum Cost To Reach Destination In Time

Kth Smallest Product Of Two Sorted Arrays

Rearrange Array Elements By Sign

Number Of Zero Filled Subarrays

Meeting Rooms Iii

Using A Robot To Print The Lexicographically Smallest String

Range Product Queries Of Powers

Maximum Sum Of Distinct Subarrays With Length K

Minimize The Maximum Difference Of Pairs

Minimum Operations To Make The Integer Zero

Ways To Express An Integer As Sum Of Powers

Count Elements With Maximum Frequency

Find The Number Of Ways To Place People I

Find The Minimum Area To Cover All Ones I

Reschedule Meetings For Maximum Free Time I

Maximize Subarrays After Removing One Conflicting Pair

Lexicographically Smallest Permutation Greater Than Target

Count And Say

Multiply Strings

Unique Paths Ii

Valid Number

Partition List

Unique Binary Search Trees Ii

Path Sum

Flatten Binary Tree To Linked List

Sum Root To Leaf Numbers

Insertion Sort List

Number Of 1 Bits

Design Add And Search Words Data Structure

Implement Queue Using Stacks

H Index

Binary Tree Vertical Order Traversal

Shortest Distance From All Buildings

Reconstruct Itinerary

Power Of Four

Design Twitter

Sum Of Two Integers

Lexicographical Numbers

Valid Word Abbreviation

Longest Palindrome

Add Strings

K Th Smallest In Lexicographical Order

Arranging Coins

Delete Node In A Bst

Can I Win

Contiguous Array

Next Greater Element Iii

Array Partition

Exchange Seats

2 Keys Keyboard

Valid Parenthesis String

Is Graph Bipartite

New 21 Game

Keys And Rooms

Reordered Power Of 2

Maximum Frequency Stack

Sort Array By Parity

Flip String To Monotone Increasing

Binary Subarrays With Sum

Reorder Data In Log Files

Vowel Spellchecker

Construct Binary Search Tree From Preorder Traversal

Next Greater Node In Linked List

Remove All Adjacent Duplicates In String

Smallest Subsequence Of Distinct Characters

Shortest Path In Binary Matrix

User Activity For The Past 30 Days I

Longest Common Subsequence

Design File System

Find The Smallest Divisor Given A Threshold

Number Of Operations To Make Network Connected

Movie Rating

How Many Numbers Are Smaller Than The Current Number

Maximum Sum Bst In Binary Tree

Kth Missing Positive Number

Percentage Of Users Attended A Contest

Maximum Number Of Events That Can Be Attended Ii

Primary Department For Each Employee

Find If Path Exists In Graph

Minimum Difference Between Highest And Lowest Of K Scores

Step By Step Directions From A Binary Tree Node To Another

Find Triangular Sum Of An Array

Add Two Integers

Successful Pairs Of Spells And Potions

Number Of People Aware Of A Secret

Removing Stars From A String

Count Subarrays With Median K

Smallest Missing Non Negative Integer After Operations

Minimum Equal Sum Of Two Arrays After Replacing Zeros

Find Missing And Repeated Values

Valid Word

Taking Maximum Energy From The Mystic Dungeon

Maximum Total Damage With Spell Casting

Delete Nodes From Linked List Present In Array

Count The Number Of Substrings With Dominant Ones

Find The Original Typed String I

Find The Original Typed String Ii

Maximum Frequency Of An Element After Performing Operations I

Design Task Manager

Length Of Longest V Shaped Diagonal Segment

Maximum Unique Subarray Sum After Deletion

Find The Minimum Amount Of Time To Brew Potions

Maximum Balanced Shipments

Maximum Total From Optimal Activation Order

Combination Sum Ii

Wildcard Matching

Insert Interval

Gray Code

Symmetric Tree

Path Sum Ii

Word Ladder Ii

Palindrome Partitioning Ii

Excel Sheet Column Title

Nth Highest Salary

Consecutive Numbers

Department Top Three Salaries

Shortest Palindrome

Combination Sum Iii

The Skyline Problem

Summary Ranges

Number Of Digit One

Meeting Rooms

Add Digits

Walls And Gates

Word Pattern

Nim Game

Bulls And Cows

Range Sum Query 2d Immutable

Burst Balloons

Bulb Switcher

Increasing Triplet Subsequence

Flatten Nested List Iterator

Reverse Vowels Of A String

Logger Rate Limiter

Largest Divisible Subset

Find The Difference

Longest Substring With At Least K Repeating Characters

Frog Jump

Flatten A Multilevel Doubly Linked List

Find All Anagrams In A String

Sort Characters By Frequency

Island Perimeter

Optimal Account Balancing

Base 7

Perfect Number

Coin Change Ii

Boundary Of Binary Tree

Reverse Words In A String Iii

Shortest Unsorted Continuous Subarray

Investments In 2016

Human Traffic Of Stadium

Can Place Flowers

Find Duplicate File In System

Design Search Autocomplete System

Set Mismatch

Trim A Binary Search Tree

Number Of Distinct Islands

Count Binary Substrings

Search In A Binary Search Tree

Insert Into A Binary Search Tree

Design Linked List

Subarray Product Less Than K

Maximum Length Of Repeated Subarray

Accounts Merge

Number Of Atoms

Delete And Earn

Find Smallest Letter Greater Than Target

Jewels And Stones

Basic Calculator Iii

K Th Symbol In Grammar

All Paths From Source To Target

Mirror Reflection

Lemonade Change

Shortest Subarray With Sum At Least K

Transpose Matrix

Nth Magical Number

Possible Bipartition

Number Of Recent Calls

Most Stones Removed With Same Row Or Column

Squares Of A Sorted Array

Distribute Coins In Binary Tree

Divisor Game

Minimum Score Triangulation Of Polygon

Lexicographically Smallest Equivalent String

Parsing A Boolean Expression

Defanging An Ip Address

Shortest Path With Alternating Colors

N Th Tribonacci Number

Immediate Food Delivery Ii

Remove All Adjacent Duplicates In String Ii

Queries Quality And Percentage

Minimum Insertion Steps To Make A String Palindrome

Convert Integer To The Sum Of Two No Zero Integers

Restaurant Growth

Check If N And Its Double Exist

Kids With The Greatest Number Of Candies

Max Difference You Can Get From Changing An Integer

Number Of Subsequences That Satisfy The Given Sum Condition

Count Submatrices With All Ones

Number Of Sub Arrays With Odd Sum

Even Odd Tree

Minimum Operations To Reduce X To Zero

Swapping Nodes In A Linked List

The Number Of Employees Which Report To Each Employee

Find The Highest Altitude

Minimum Number Of People To Teach

Sum Of Unique Elements

Minimum Number Of Operations To Move All Balls To Each Box

Sum Of Beauty Of All Substrings

Maximum Average Pass Ratio

Build Array From Permutation

Gcd Sort Of An Array

Detonate The Maximum Bombs

Minimum Operations To Make The Array Alternating

Minimum Time To Complete Trips

Find All K Distant Indices In An Array

Count Hills And Valleys In An Array

Count Number Of Rectangles Containing Each Point

Escape The Spreading Fire

Count Unreachable Pairs Of Nodes In An Undirected Graph

Smallest Number In Infinite Set

Best Poker Hand

Maximum Tastiness Of Candy Basket

Minimum Operations To Reduce An Integer To 0

Array Prototype Last

Filter Elements From Array

Row With Maximum Ones

Find The Maximum Achievable Number

Longest Non Decreasing Subarray From Two Arrays

Divisible And Non Divisible Sums Difference

Divide Array Into Arrays With Max Difference

Score Of A String

Find The Maximum Length Of Valid Subsequence I

Find The Maximum Length Of Valid Subsequence Ii

Find The K Th Character In String Game Ii

Make Array Elements Equal To Zero

Zero Array Transformation I

Maximum Number Of Distinct Elements After Operations

Sort Matrix By Diagonals

Fruits Into Baskets Iii

Permutations Ii

Permutation Sequence

Search In Rotated Sorted Array Ii

Remove Duplicates From Sorted List Ii

Restore Ip Addresses

Construct Binary Tree From Inorder And Postorder Traversal

Minimum Depth Of Binary Tree

Best Time To Buy And Sell Stock Iii

Compare Version Numbers

Fraction To Recurring Decimal

Excel Sheet Column Number

Factorial Trailing Zeroes

Duplicate Emails

Customers Who Never Order

Department Highest Salary

Repeated Dna Sequences

Reverse Bits

Bitwise And Of Numbers Range

Count Complete Tree Nodes

Different Ways To Add Parentheses

Binary Tree Paths

Encode And Decode Strings

Best Meeting Point

Number Of Islands Ii

Minimum Height Trees

Longest Increasing Path In A Matrix

Patching Array

Counting Bits

Nested List Weight Sum

Maximum Xor Of Two Numbers In An Array

Convert Binary Search Tree To Sorted Doubly Linked List

N Ary Tree Level Order Traversal

Number Of Segments In A String

Path Sum Iii

Find All Duplicates In An Array

Add Two Numbers Ii

Minimum Number Of Arrows To Burst Balloons

Minimum Moves To Equal Array Elements

Hamming Distance

Sliding Window Median

Relative Ranks

Game Play Analysis I

Longest Palindromic Subsequence

Continuous Subarray Sum

Convert Bst To Greater Tree

Reverse String Ii

Game Play Analysis Iv

Subtree Of Another Tree

Out Of Boundary Paths

Employee Bonus

Friend Requests Ii Who Has The Most Friends

Triangle Judgement

Not Boring Movies

Average Of Levels In Binary Tree

Maximum Length Of Pair Chain

Image Smoother

Strange Printer

Longest Continuous Increasing Subsequence

Degree Of An Array

Design Hashmap

Number Of Distinct Islands Ii

Max Stack

My Calendar I

Network Delay Time

Employee Free Time

Number Of Matching Subsequences

Largest Triangle Area

Most Common Word

Backspace String Compare

Loud And Rich

Leaf Similar Trees

Sort An Array

Maximum Sum Circular Subarray

Sort Array By Parity Ii

Shortest Bridge

Valid Mountain Array

Reveal Cards In Increasing Order

Unique Paths Iii

Minimum Cost For Tickets

Interval List Intersections

Find The Town Judge

Find Common Characters

Stream Of Characters

Uncrossed Lines

Binary Search Tree To Greater Sum Tree

Robot Bounded In Circle

Longest String Chain

Greatest Common Divisor Of Strings

Car Pooling

Find In Mountain Array

Parallel Courses

Product Price At A Given Date

Minimum Cost To Connect Sticks

Invalid Transactions

Sort Items By Groups Respecting Dependencies

Last Person To Fit In The Bus

Minimum Cost To Move Chips To The Same Position

Count Number Of Nice Subarrays

Count Servers That Communicate

Students And Examinations

Shortest Path In A Grid With Obstacles Elimination

Find Numbers With Even Number Of Digits

Maximum 69 Number

Minimum Number Of Taps To Open To Water A Garden

Angle Between Hands Of A Clock

Number Of Substrings Containing All Three Characters

Find Lucky Integer In An Array

Destination City

Shuffle The Array

Design Browser History

Running Sum Of 1d Array

The Kth Factor Of N

Longest Subarray Of 1s After Deleting One Element

Make The String Great

Maximum Nesting Depth Of The Parentheses

Lexicographically Smallest String After Applying Operations

Minimum Deletions To Make Character Frequencies Unique

Defuse The Bomb

Fix Names In A Table

Richest Customer Wealth

Number Of Students Unable To Eat Lunch

Maximum Score From Removing Substrings

Minimum Length Of String After Deleting Similar Ends

Minimum Limit Of Balls In A Bag

Finding The Users Active Minutes

Sorting The Sentence

Check If All The Integers In A Range Are Covered

Find A Peak Element Ii

Nearest Exit From Entrance In Maze

Painting A Grid With Three Different Colors

Last Day Where You Can Still Cross

Reverse Prefix Of Word

Final Value Of Variable After Performing Operations

Maximum Alternating Subarray Sum

Find The Minimum And Maximum Number Of Nodes Between Critical Points

Count Vowel Substrings Of A String

Minimized Maximum Of Products Distributed To Any Store

Most Beautiful Item For Each Query

Finding 3 Digit Even Numbers

Find Subsequence Of Length K With The Largest Sum

Maximum Fruits Harvested After At Most K Steps

Maximum Number Of Words Found In Sentences

Minimum Sum Of Four Digit Number After Splitting Digits

All Ancestors Of A Node In A Directed Acyclic Graph

Maximum Candies Allocated To K Children

Minimum Rounds To Complete All Tasks

Count Nodes Equal To Average Of Subtree

Number Of Ways To Split Array

Find Resultant Array After Removing Anagrams

Sum Of Total Strength Of Wizards

Apply Discount To Prices

Task Scheduler Ii

Find The K Sum Of An Array

Optimal Partition Of String

Smallest Subarrays With Maximum Bitwise Or

Longest Subarray With Maximum Bitwise And

Largest Positive Integer That Exists With Its Negative

Minimum Fuel Cost To Report To The Capital

Delete Greatest Value In Each Row

Put Marbles In Bags

Maximum Difference By Remapping A Digit

Sleep

Cache With Time Limit

Cousins In Binary Tree Ii

Buy Two Chocolates

Maximum Beauty Of An Array After Applying Operation

Count Complete Subarrays In An Array

Reshape Data Melt

Distribute Candies Among Children Ii

Maximum Size Of A Set After Removals

Water Bottles Ii

String Compression Iii

Minimum Amount Of Damage Dealt To Bob

Find The K Th Character In String Game I

Minimize The Maximum Adjacent Element Difference

Count Subarrays Of Length Three With A Condition

Find The Lexicographically Largest String From The Box I

Maximum Difference Between Adjacent Elements In A Circular Array

Maximum And Minimum Sums Of At Most Size K Subsequences

Find Valid Pair Of Adjacent Digits In String

Reschedule Meetings For Maximum Free Time Ii

Maximum Difference Between Even And Odd Frequency I

Unique 3 Digit Even Numbers

Minimum Pair Removal To Sort Array I

Find Closest Person

Find Most Frequent Vowel And Consonant

Minimum Operations To Convert All Elements To Zero

Longest Common Prefix Between Adjacent Strings After Removals

Minimum Operations To Equalize Binary String

Sum Of Perfect Square Ancestors

Back to AmazonLeetCode Index