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

Facebook — 180 Days

Minimum Remove To Make Valid Parentheses

Valid Word Abbreviation

Valid Palindrome Ii

Kth Largest Element In An Array

Binary Tree Right Side View

Binary Tree Vertical Order Traversal

Random Pick With Weight

Nested List Weight Sum

Basic Calculator Ii

Lowest Common Ancestor Of A Binary Tree

Diameter Of Binary Tree

Merge Intervals

Lowest Common Ancestor Of A Binary Tree Iii

Two Sum

Simplify Path

Subarray Sum Equals K

Find Peak Element

Powx N

Top K Frequent Elements

Best Time To Buy And Sell Stock

Shortest Path In Binary Matrix

Buildings With An Ocean View

Sum Root To Leaf Numbers

Merge Sorted Array

Valid Palindrome

Next Permutation

Making A Large Island

Lru Cache

Copy List With Random Pointer

K Closest Points To Origin

Minimum Window Substring

Dot Product Of Two Sparse Vectors

Range Sum Of Bst

Valid Parentheses

Max Consecutive Ones Iii

Find First And Last Position Of Element In Sorted Array

Custom Sort String

Minimum Add To Make Parentheses Valid

Maximum Swap

Clone Graph

Exclusive Time Of Functions

Add Two Numbers

Longest Common Prefix

Course Schedule

Vertical Order Traversal Of A Binary Tree

Merge K Sorted Lists

Moving Average From Data Stream

Diagonal Traverse

Kth Missing Positive Number

Longest Substring Without Repeating Characters

Palindromic Substrings

Interval List Intersections

Longest Palindromic Substring

Add Strings

Sliding Window Median

All Nodes Distance K In Binary Tree

Count Nodes Equal To Average Of Subtree

Remove Nth Node From End Of List

Valid Number

3sum

Remove Duplicates From Sorted Array

Robot Room Cleaner

Insert Into A Sorted Circular Linked List

Container With Most Water

Closest Binary Search Tree Value

Binary Search Tree Iterator

Strobogrammatic Number

Goat Latin

Longest Valid Parentheses

Maximum Subarray

Subsets

Group Shifted Strings

String To Integer Atoi

Missing Element In Sorted Array

Valid Palindrome Iii

Palindrome Number

Set Matrix Zeroes

Sort Colors

Missing Ranges

Kth Smallest Element In A Sorted Matrix

Random Pick Index

Koko Eating Bananas

Simple Bank System

Trapping Rain Water

Contains Duplicate Ii

Accounts Merge

Median Of Two Sorted Arrays

Roman To Integer

Search In Rotated Sorted Array

Number Of Islands

Group Anagrams

Word Ladder

Sliding Window Maximum

Convert Binary Search Tree To Sorted Doubly Linked List

Boundary Of Binary Tree

Friends Of Appropriate Ages

Check Completeness Of A Binary Tree

Squares Of A Sorted Array

Remove All Adjacent Duplicates In String Ii

Find Median From Data Stream

Peak Index In A Mountain Array

Capacity To Ship Packages Within D Days

4sum

Merge Two Sorted Lists

Generate Parentheses

Best Time To Buy And Sell Stock Iii

Majority Element

Move Zeroes

Range Sum Query Immutable

Design Tic Tac Toe

Continuous Subarray Sum

Swim In Rising Water

Rotate Image

Unique Paths

Populating Next Right Pointers In Each Node

Insert Delete Getrandom O1

Decode String

Single Element In A Sorted Array

Reverse Integer

Climbing Stairs

Binary Tree Level Order Traversal

Pascals Triangle

Best Time To Buy And Sell Stock Ii

Binary Tree Maximum Path Sum

Remove Invalid Parentheses

Odd Even Linked List

Longest Repeating Character Replacement

Max Area Of Island

Shortest Bridge

Minimum Deletions For At Most K Distinct Characters

Regular Expression Matching

3sum Closest

Remove Element

Search Insert Position

Gas Station

Course Schedule Ii

Palindrome Linked List

Meeting Rooms Ii

Alien Dictionary

Expression Add Operators

Coin Change

Next Greater Element Iii

Find Pivot Index

Remove All Adjacent Duplicates In String

Article Views I

Spiral Matrix

Jump Game

Text Justification

Palindrome Partitioning

Single Number

Word Break

Rotate Array

Shortest Distance From All Buildings

Longest Increasing Path In A Matrix

Battleships In A Board

Construct Binary Tree From String

Managers With At Least 5 Direct Reports

Can Place Flowers

Car Pooling

Diagonal Traverse Ii

Kids With The Greatest Number Of Candies

Add Two Integers

Find The Index Of The First Occurrence In A String

Plus One

Largest Rectangle In Histogram

Maximal Rectangle

Subsets Ii

Longest Consecutive Sequence

Contains Duplicate

Power Of Two

Valid Anagram

Walls And Gates

Longest Increasing Subsequence

Intersection Of Two Arrays

Find K Closest Elements

Rotting Oranges

Product Of Two Run Length Encoded Arrays

Maximum Difference By Remapping A Digit

Zigzag Conversion

Letter Combinations Of A Phone Number

Reverse Nodes In K Group

Multiply Strings

Permutations

Combinations

Decode Ways

Binary Tree Inorder Traversal

Validate Binary Search Tree

Same Tree

Binary Tree Zigzag Level Order Traversal

Reverse Bits

Reverse Linked List

Basic Calculator

Lowest Common Ancestor Of A Binary Search Tree

Delete Node In A Linked List

Strobogrammatic Number Ii

Serialize And Deserialize Binary Tree

Sparse Matrix Multiplication

String Compression

The Maze

Next Greater Element I

Next Greater Element Ii

Binary Search

Longest Common Subsequence

Fruits Into Baskets Ii

Divide Two Integers

Combination Sum Ii

First Missing Positive

N Queens

Add Binary

Sqrtx

Search A 2d Matrix

Unique Binary Search Trees

Minimum Depth Of Binary Tree

Triangle

Reverse Words In A String

Min Stack

Two Sum Ii Input Array Is Sorted

Largest Number

Rising Temperature

Minimum Size Subarray Sum

House Robber Ii

Search A 2d Matrix Ii

First Bad Version

Reverse String

Pacific Atlantic Water Flow

Sort Characters By Frequency

Merge Two Binary Trees

Design Circular Queue

Repeated String Match

Asteroid Collision

Min Cost Climbing Stairs

Rotate String

Middle Of The Linked List

Monotonic Array

Sum Of Subarray Minimums

Monthly Transactions I

Average Selling Price

Maximum Number Of Events That Can Be Attended

Minimum Time To Collect All Apples In A Tree

Merge Strings Alternately

Frequency Of The Most Frequent Element

Largest Color Value In A Directed Graph

Cutting Ribbons

Minimize The Maximum Difference Of Pairs

Distribute Candies Among Children Ii

Best Time To Buy And Sell Stock Using Strategy

Integer To Roman

Valid Sudoku

Sudoku Solver

Wildcard Matching

Search In Rotated Sorted Array Ii

Reverse Linked List Ii

Interleaving String

Word Ladder Ii

Linked List Cycle

Reorder List

Maximum Product Subarray

Intersection Of Two Linked Lists

Fraction To Recurring Decimal

Second Highest Salary

Rank Scores

Happy Number

Count Primes

Isomorphic Strings

Implement Stack Using Queues

Kth Smallest Element In A Bst

Find The Duplicate Number

Increasing Triplet Subsequence

Reverse Vowels Of A String

Is Subsequence

Remove K Digits

Non Overlapping Intervals

Max Consecutive Ones

Target Sum

Contiguous Array

Minesweeper

Big Countries

Task Scheduler

Maximum Width Of Binary Tree

Design Hashmap

Toeplitz Matrix

Letter Case Permutation

Online Stock Span

Fruit Into Baskets

Sort Array By Parity

Number Of Recent Calls

Minimum Cost For Tickets

Customers Who Bought All Products

Maximum Level Sum Of A Binary Tree

Design Skiplist

Unique Number Of Occurrences

Students And Examinations

Shortest Path In A Grid With Obstacles Elimination

Find Lucky Integer In An Array

Lowest Common Ancestor Of A Binary Tree Ii

Check If Two String Arrays Are Equivalent

Max Number Of K Sum Pairs

Recyclable And Low Fat Products

Sum Of Beauty Of All Substrings

Finding 3 Digit Even Numbers

Find Subsequence Of Length K With The Largest Sum

Rearrange Array Elements By Sign

Count Unguarded Cells In The Grid

Count Elements With Maximum Frequency

Find The K Th Character In String Game I

Find Most Frequent Vowel And Consonant

Jump Game Ii

Rotate List

Minimum Path Sum

Word Search

Unique Binary Search Trees Ii

Construct Binary Tree From Preorder And Inorder Traversal

Binary Tree Level Order Traversal Ii

Balanced Binary Tree

Path Sum Ii

Flatten Binary Tree To Linked List

Populating Next Right Pointers In Each Node Ii

Candy

Sort List

Max Points On A Line

Find Minimum In Rotated Sorted Array

Combine Two Tables

Employees Earning More Than Their Managers

Customers Who Never Order

Repeated Dna Sequences

Tenth Line

Implement Trie Prefix Tree

The Skyline Problem

Product Of Array Except Self

Missing Number

Bulb Switcher

Counting Bits

Flatten Nested List Iterator

Partition Equal Subset Sum

Reverse Pairs

Coin Change Ii

Game Play Analysis Iv

Friend Requests Ii Who Has The Most Friends

Exchange Seats

Sum Of Square Numbers

Valid Parenthesis String

24 Game

Redundant Connection

Maximum Sum Of 3 Non Overlapping Subarrays

Subarray Product Less Than K

Open The Lock

Number Of Matching Subsequences

New 21 Game

Smallest Subtree With All The Deepest Nodes

Snakes And Ladders

Minimum Falling Path Sum

Binary Tree Cameras

Longest String Chain

Lowest Common Ancestor Of Deepest Leaves

Count Number Of Nice Subarrays

Count Square Submatrices With All Ones

Find The Smallest Divisor Given A Threshold

Element Appearing More Than 25 In Sorted Array

Maximum Number Of Occurrences Of A Substring

Number Of Operations To Make Network Connected

Rank Transform Of An Array

Maximum Sum Bst In Binary Tree

Maximum Points You Can Obtain From Cards

Consecutive Characters

Running Sum Of 1d Array

Three Consecutive Odds

Richest Customer Wealth

Find Minimum Time To Finish All Jobs

Shortest Path In A Hidden Grid

Remove All Occurrences Of A Substring

Count Good Numbers

Check If A Parentheses String Can Be Valid

Find All K Distant Indices In An Array

Successful Pairs Of Spells And Potions

Collect Coins In A Tree

Minimum Operations To Make The Integer Zero

Find The Peaks

Zero Array Transformation Iii

Find The Minimum Amount Of Time To Brew Potions

Combination Sum

Permutations Ii

Length Of Last Word

Unique Paths Ii

Remove Duplicates From Sorted Array Ii

Remove Duplicates From Sorted List

Restore Ip Addresses

Recover Binary Search Tree

Path Sum

Distinct Subsequences

Surrounded Regions

Palindrome Partitioning Ii

Linked List Cycle Ii

Insertion Sort List

Number Of 1 Bits

Delete Duplicate Emails

House Robber

Remove Linked List Elements

Word Search Ii

Invert Binary Tree

Implement Queue Using Stacks

Ugly Number Ii

Find The Celebrity

Game Of Life

Nim Game

Binary Tree Longest Consecutive Sequence

Remove Duplicate Letters

Power Of Three

Largest Bst Subtree

Integer Break

Intersection Of Two Arrays Ii

Valid Perfect Square

Find K Pairs With Smallest Sums

First Unique Character In A String

Evaluate Division

Trapping Rain Water Ii

Longest Palindrome

Split Array Largest Sum

Arithmetic Slices

Maximum Xor Of Two Numbers In An Array

Flatten A Multilevel Doubly Linked List

Path Sum Iii

Find All Anagrams In A String

Add Two Numbers Ii

132 Pattern

Island Perimeter

Validate Ip Address

Matchsticks To Square

Longest Uncommon Subsequence I

Complex Number Multiplication

Reverse String Ii

01 Matrix

Number Of Provinces

Investments In 2016

Longest Harmonious Subsequence

Human Traffic Of Stadium

Find Duplicate File In System

Triangle Judgement

Valid Triangle Number

Add Bold Tag In String

Swap Salary

Smallest Range Covering Elements From K Lists

Average Of Levels In Binary Tree

Maximum Average Subarray I

Non Decreasing Array

Top K Frequent Words

Cherry Pickup

Network Delay Time

Partition Labels

Jewels And Stones

Rabbits In Forest

Cheapest Flights Within K Stops

All Paths From Source To Target

Most Profit Assigning Work

Rectangle Overlap

Backspace String Compare

Hand Of Straights

Lemonade Change

Transpose Matrix

Binary Subarrays With Sum

Valid Mountain Array

Most Stones Removed With Same Row Or Column

Verifying An Alien Dictionary

Subarray Sums Divisible By K

Largest Perimeter Triangle

Unique Paths Iii

Cousins In Binary Tree

Construct Binary Search Tree From Preorder Traversal

Best Sightseeing Pair

Remove Outermost Parentheses

Sum Of Root To Leaf Binary Numbers

Minimum Score Triangulation Of Polygon

Distant Barcodes

Product Sales Analysis I

Product Sales Analysis Iii

Greatest Common Divisor Of Strings

Parsing A Boolean Expression

User Activity For The Past 30 Days I

Find Words That Can Be Formed By Characters

Immediate Food Delivery Ii

Reformat Department Table

Minimum Knight Moves

Last Person To Fit In The Bus

Queries Quality And Percentage

Find Winner On A Tic Tac Toe Game

Convert Binary Number In A Linked List To Integer

Find N Unique Integers Sum Up To Zero

Maximum 69 Number

Movie Rating

Count Negative Numbers In A Sorted Matrix

Product Of The Last K Numbers

Validate Binary Tree Nodes

Replace Employee Id With The Unique Identifier

Destination City

Course Schedule Iv

Shuffle The Array

Minimum Number Of Days To Make M Bouquets

Clone Binary Tree With Random Pointer

Avoid Flood In The City

Find Root Of N Ary Tree

Diameter Of N Ary Tree

Minimum Number Of Vertices To Reach All Nodes

Customer Who Visited But Did Not Make Any Transactions

Sort Array By Increasing Frequency

Average Time Of Process Per Machine

Maximum Score From Removing Substrings

Swapping Nodes In A Linked List

Find The Highest Altitude

Check If Array Is Sorted And Rotated

Primary Department For Each Employee

Maximum Average Pass Ratio

Check If The Sentence Is Pangram

Finding Pairs With A Certain Sum

Minimize Maximum Pair Sum In Array

The Earliest And Latest Rounds Where Players Compete

Find A Peak Element Ii

Maximum Alternating Subsequence Sum

Concatenation Of Array

Painting A Grid With Three Different Colors

Maximum Difference Between Increasing Elements

Next Greater Numerically Balanced Number

Sum Of K Mirror Numbers

Longest Palindrome By Concatenating Two Letter Words

Maximum Candies Allocated To K Children

Count Number Of Rectangles Containing Each Point

Minimum Score After Removals On A Tree

Decode The Message

Smallest Number In Infinite Set

Number Of Zero Filled Subarrays

Smallest Subarrays With Maximum Bitwise Or

Number Of Pairs Satisfying Inequality

Design Memory Allocator

Rearranging Fruits

Merge Two 2d Arrays By Summing Values

Find The Prefix Common Array Of Two Arrays

To Be Or Not To Be

Count Symmetric Integers

Divisible And Non Divisible Sums Difference

Count The Number Of Infection Sequences

Find Missing And Repeated Values

Maximum Area Of Longest Diagonal Rectangle

Find The Number Of Ways To Place People I

Find The Number Of Ways To Place People Ii

Find The Xor Of Numbers Which Appear Twice

Lexicographically Minimum String After Removing Stars

Find The Maximum Length Of Valid Subsequence I

Vowels Game In A String

Find The Original Typed String I

Maximum Frequency Of An Element After Performing Operations I

Make Array Elements Equal To Zero

Find The Lexicographically Largest String From The Box I

Maximum Difference Between Adjacent Elements In A Circular Array

Maximum Manhattan Distance After K Changes

Check If Digits Are Equal In String After Operations I

Maximum Unique Subarray Sum After Deletion

Find Closest Person

Grid Teleportation Traversal

Partition Array Into Two Equal Product Subsets

Count Number Of Trapezoids Ii

Compute Decimal Representation

Back to FacebookLeetCode Index