Tag: hash-table
- 3Sum With Multiplicity
- 4Sum II
- Accounts Merge
- Add Bold Tag in String
- Add Edges to Make Degrees of All Nodes Even
- Alert Using Same Key-Card Three or More Times in a One Hour Period
- All Nodes Distance K in Binary Tree
- All O`one Data Structure
- Alphabet Board Path
- Alt and Tab Simulation
- Amount of Time for Binary Tree to Be Infected
- Analyze User Website Visit Pattern
- Apply Discount Every n Orders
- Apply Operations on Array to Maximize Sum of Squares
- Apply Operations to Make String Empty
- Apply Substitutions
- Arithmetic Subarrays
- Array of Doubled Pairs
- Assign Elements to Groups with Constraints
- Avoid Flood in The City
- Basic Calculator IV
- Before and After Puzzle
- Best Poker Hand
- Better Compression of String
- Binary Subarrays With Sum
- Binary Tree Vertical Order Traversal
- Binary Trees With Factors
- Bold Words in String
- Brick Wall
- Buddy Strings
- Bulls and Cows
- Bus Routes
- Can Convert String in K Moves
- Can Make Palindrome from Substring
- Card Flipping Game
- Change Minimum Characters to Satisfy One of Three Conditions
- Check Array Formation Through Concatenation
- Check Distances Between Same Letters
- Check If a String Contains All Binary Codes of Size K
- Check if All Characters Have Equal Number of Occurrences
- Check if All the Integers in a Range Are Covered
- Check if an Array Is Consecutive
- Check if Array is Good
- Check If Array Pairs Are Divisible by k
- Check if DFS Strings Are Palindromes
- Check if Every Row and Column Contains All Numbers
- Check If N and Its Double Exist
- Check if Number Has Equal Digit Count and Digit Value
- Check if One String Swap Can Make Strings Equal
- Check if Strings Can be Made Equal With Operations II
- Check if The Number is Fascinating
- Check if the Sentence Is Pangram
- Check If Two Expression Trees are Equivalent
- Check Whether Two Strings are Almost Equivalent
- Cinema Seat Allocation
- Circular Array Loop
- Clone Binary Tree With Random Pointer
- Clone Graph
- Clone N-ary Tree
- Closest Equal Element Queries
- Compare Strings by Frequency of the Smallest Character
- Construct 2D Grid Matching Graph Layout
- Construct Binary Tree from Inorder and Postorder Traversal
- Construct Binary Tree from Preorder and Inorder Traversal
- Construct Binary Tree from Preorder and Postorder Traversal
- Construct K Palindrome Strings
- Construct String With Repeat Limit
- Contains Duplicate II
- Contains Duplicate
- Contiguous Array
- Continuous Subarray Sum
- Convert an Array Into a 2D Array With Conditions
- Copy List with Random Pointer
- Correct a Binary Tree
- Count Almost Equal Pairs I
- Count Almost Equal Pairs II
- Count Anagrams
- Count Artifacts That Can Be Extracted
- Count Beautiful Substrings I
- Count Beautiful Substrings II
- Count Common Words With One Occurrence
- Count Complete Subarrays in an Array
- Count Complete Substrings
- Count Connected Components in LCM Graph
- Count Distinct Numbers on Board
- Count Elements With Maximum Frequency
- Count Good Meals
- Count K-Subsequences of a String With Maximum Beauty
- Count Largest Group
- Count Lattice Points Inside a Circle
- Count Nice Pairs in an Array
- Count Number of Bad Pairs
- Count Number of Distinct Integers After Reverse Operations
- Count Number of Nice Subarrays
- Count Number of Pairs With Absolute Difference K
- Count Number of Possible Root Nodes
- Count Number of Rectangles Containing Each Point
- Count Number of Texts
- Count Numbers With Unique Digits II
- Count of Interesting Subarrays
- Count of Sub-Multisets With Bounded Sum
- Count of Substrings Containing Every Vowel and K Consonants I
- Count of Substrings Containing Every Vowel and K Consonants II
- Count Pairs of Equal Substrings With Minimum Difference
- Count Pairs of Points With Distance k
- Count Pairs Of Similar Strings
- Count Pairs That Form a Complete Day I
- Count Pairs That Form a Complete Day II
- Count Special Quadruplets
- Count Special Subsequences
- Count Subarrays With Median K
- Count Substrings That Can Be Rearranged to Contain a String I
- Count Substrings That Can Be Rearranged to Contain a String II
- Count Substrings That Differ by One Character
- Count Substrings With K-Frequency Characters I
- Count Substrings With K-Frequency Characters II
- Count Substrings Without Repeating Character
- Count the Number of Beautiful Subarrays
- Count the Number of Consistent Strings
- Count the Number of Good Partitions
- Count the Number of Good Subarrays
- Count the Number of Good Subsequences
- Count the Number of Special Characters I
- Count the Number of Special Characters II
- Count Triplets That Can Form Two Arrays of Equal XOR
- Count Unique Characters of All Substrings of a Given String
- Count Vowel Substrings of a String
- Count Words Obtained After Adding a Letter
- Count Zero Request Servers
- Counting Elements
- Cousins in Binary Tree II
- Create Binary Tree From Descriptions
- Custom Sort String
- Decode the Message
- Degree of an Array
- Delete and Earn
- Delete Duplicate Folders in System
- Delete Nodes And Return Forest
- Delete Nodes From Linked List Present in Array
- Describe the Painting
- Design a 3D Binary Matrix with Efficient Layer Tracking
- Design a File Sharing System
- Design a Food Rating System
- Design A Leaderboard
- Design a Number Container System
- Design a Todo List
- Design an Array Statistics Tracker
- Design an Ordered Stream
- Design Authentication Manager
- Design Bitset
- Design Excel Sum Formula
- Design File System
- Design HashMap
- Design HashSet
- Design In-Memory File System
- Design Log Storage System
- Design Memory Allocator
- Design Most Recently Used Queue
- Design Movie Rental System
- Design Neighbor Sum Service
- Design Phone Directory
- Design Snake Game
- Design Spreadsheet
- Design SQL
- Design Task Manager
- Design Tic-Tac-Toe
- Design Twitter
- Design Underground System
- Design Video Sharing Platform
- Destination City
- Destroy Sequential Targets
- Detect Squares
- Determine if Two Strings Are Close
- Difference of Number of Distinct Values on Diagonals
- Dinner Plate Stacks
- Display Table of Food Orders in a Restaurant
- Distant Barcodes
- Distinct Numbers in Each Subarray
- Distinct Prime Factors of Product of Array
- Distribute Candies
- Divide an Array Into Subarrays With Minimum Cost II
- Divide Array in Sets of K Consecutive Numbers
- Divide Array Into Equal Pairs
- Divide Players Into Teams of Equal Skill
- Dot Product of Two Sparse Vectors
- Employee Importance
- Encode and Decode TinyURL
- Encrypt and Decrypt Strings
- Equal Row and Column Pairs
- Equal Sum Arrays With Minimum Number of Operations
- Escape a Large Maze
- Evaluate the Bracket Pairs of a String
- Existence of a Substring in a String and Its Reverse
- Extra Characters in a String
- Fair Candy Swap
- Find a Good Subset of the Matrix
- Find All Anagrams in a String
- Find All Duplicates in an Array
- Find All Lonely Numbers in the Array
- Find All Numbers Disappeared in an Array
- Find All Possible Recipes from Given Supplies
- Find Anagram Mappings
- Find And Replace in String
- Find and Replace Pattern
- Find Common Characters
- Find Common Elements Between Two Arrays
- Find Consecutive Integers from a Data Stream
- Find Distance in a Binary Tree
- Find Duplicate File in System
- Find Duplicate Subtrees
- Find Elements in a Contaminated Binary Tree
- Find K-Length Substrings With No Repeated Characters
- Find Latest Group of Size M
- Find Longest Awesome Substring
- Find Longest Self-Contained Substring
- Find Longest Special Substring That Occurs Thrice I
- Find Longest Special Substring That Occurs Thrice II
- Find Lucky Integer in an Array
- Find Maximum Number of String Pairs
- Find Maximum Removals From Source String
- Find Mirror Score of a String
- Find Missing and Repeated Values
- Find Occurrences of an Element in an Array
- Find Original Array From Doubled Array
- Find Players With Zero or One Losses
- Find Resultant Array After Removing Anagrams
- Find Root of N-Ary Tree
- Find Score of an Array After Marking All Elements
- Find Smallest Common Element in All Rows
- Find Subarrays With Equal Sum
- Find Subsequence of Length K With the Largest Sum
- Find Subtree Sizes After Changes
- Find the Count of Good Integers
- Find the Difference of Two Arrays
- Find the Difference
- Find the Distinct Difference Array
- Find the Largest Almost Missing Integer
- Find the Length of the Longest Common Prefix
- Find the Longest Equal Subarray
- Find the Longest Substring Containing Vowels in Even Counts
- Find the Losers of the Circular Game
- Find the Maximum Length of a Good Subsequence I
- Find the Maximum Length of a Good Subsequence II
- Find the Maximum Number of Elements in Subset
- Find the Median of the Uniqueness Array
- Find the Number of Distinct Colors Among the Balls
- Find the Number of Good Pairs I
- Find the Number of Good Pairs II
- Find the Number of Winning Players
- Find the Prefix Common Array of Two Arrays
- Find the Substring With Maximum Cost
- Find the Town Judge
- Find the XOR of Numbers Which Appear Twice
- Find Two Non-overlapping Sub-arrays Each With Target Sum
- Find Unique Binary String
- Find Valid Pair of Adjacent Digits in String
- Find Winner on a Tic Tac Toe Game
- Find Words That Can Be Formed by Characters
- Find X-Sum of All K-Long Subarrays I
- Find X-Sum of All K-Long Subarrays II
- Finding 3-Digit Even Numbers
- Finding Pairs With a Certain Sum
- Finding the Users Active Minutes
- First Completely Painted Row or Column
- First Letter to Appear Twice
- First Missing Positive
- First Unique Character in a String
- First Unique Number
- Flip Columns For Maximum Number of Equal Rows
- Form Smallest Number From Two Digit Arrays
- Fraction to Recurring Decimal
- Frequency Tracker
- Fruit Into Baskets
- Get Watched Videos by Your Friends
- Greatest English Letter in Upper and Lower Case
- Grid Illumination
- Group Anagrams
- Group Shifted Strings
- Group the People Given the Group Size They Belong To
- Groups of Special-Equivalent Strings
- Hand of Straights
- Happy Number
- High-Access Employees
- High Five
- How Many Numbers Are Smaller Than the Current Number
- HTML Entity Parser
- Identify the Largest Outlier in an Array
- Implement Magic Dictionary
- Implement Trie II (Prefix Tree)
- Implement Trie (Prefix Tree)
- Increasing Decreasing String
- Insert Delete GetRandom O(1) - Duplicates allowed
- Insert Delete GetRandom O(1)
- Integer to Roman
- Intersection of Multiple Arrays
- Intersection of Three Sorted Arrays
- Intersection of Two Arrays II
- Intersection of Two Arrays
- Intersection of Two Linked Lists
- Intervals Between Identical Elements
- Invalid Transactions
- Isomorphic Strings
- Jewels and Stones
- Jump Game IV
- K-diff Pairs in an Array
- K Divisible Elements Subarrays
- Keep Multiplying Found Values by Two
- Keyboard Row
- Kill Process
- Kth Distinct String in an Array
- Largest Color Value in a Directed Graph
- Largest Combination With Bitwise AND Greater Than Zero
- Largest Component Size by Common Factor
- Largest Palindromic Number
- Largest Positive Integer That Exists With Its Negative
- Largest Substring Between Two Equal Characters
- Largest Unique Number
- Largest Values From Labels
- Least Number of Unique Integers after K Removals
- Length of Longest Fibonacci Subsequence
- Length of Longest Subarray With at Most K Frequency
- Length of the Longest Valid Substring
- Letter Combinations of a Phone Number
- Letter Tile Possibilities
- Lexicographically Minimum String After Removing Stars
- LFU Cache
- Line Reflection
- Linked List Components
- Linked List Cycle II
- Linked List Cycle
- Linked List Frequency
- Logger Rate Limiter
- Lonely Pixel I
- Lonely Pixel II
- Longest Arithmetic Subsequence of Given Difference
- Longest Arithmetic Subsequence
- Longest Common Subsequence Between Sorted Arrays
- Longest Consecutive Sequence
- Longest Harmonious Subsequence
- Longest Ideal Subsequence
- Longest Nice Substring
- Longest Palindrome by Concatenating Two Letter Words
- Longest Palindrome
- Longest Repeating Character Replacement
- Longest Special Path II
- Longest Special Path
- Longest Square Streak in an Array
- Longest String Chain
- Longest Substring with At Least K Repeating Characters
- Longest Substring with At Most K Distinct Characters
- Longest Substring with At Most Two Distinct Characters
- Longest Substring Without Repeating Characters
- Longest Uncommon Subsequence II
- Longest Well-Performing Interval
- Longest Word in Dictionary
- Lowest Common Ancestor of a Binary Tree III
- Lowest Common Ancestor of a Binary Tree IV
- Lowest Common Ancestor of Deepest Leaves
- LRU Cache
- Magic Squares In Grid
- Majority Element II
- Majority Element
- Make Array Zero by Subtracting Equal Amounts
- Make Number of Distinct Characters Equal
- Make Sum Divisible by P
- Make Two Arrays Equal by Reversing Subarrays
- Making File Names Unique
- Map Sum Pairs
- Mark Elements on Array by Performing Queries
- Match Alphanumerical Pattern in Matrix I
- Match Substring After Replacement
- Max Number of K-Sum Pairs
- Max Pair Sum in an Array
- Max Points on a Line
- Max Sum of a Pair With Equal Sum of Digits
- Maximize the Beauty of the Garden
- Maximize the Profit as the Salesman
- Maximum Difference Between Even and Odd Frequency I
- Maximum Earnings From Taxi
- Maximum Elegance of a K-Length Subsequence
- Maximum Equal Frequency
- Maximum Erasure Value
- Maximum Frequency After Subarray Operation
- Maximum Frequency Score of a Subarray
- Maximum Frequency Stack
- Maximum Genetic Difference Query
- Maximum Good Subarray Sum
- Maximum Length Substring With Two Occurrences
- Maximum Linear Stock Score
- Maximum Manhattan Distance After K Changes
- Maximum Number of Balloons
- Maximum Number of Balls in a Box
- Maximum Number of Integers to Choose From a Range I
- Maximum Number of Non-Overlapping Subarrays With Sum Equals Target
- Maximum Number of Occurrences of a Substring
- Maximum Number of Pairs in Array
- Maximum Number of Ways to Partition an Array
- Maximum Number of Words You Can Type
- Maximum Palindromes After Operations
- Maximum Points Inside the Square
- Maximum Size of a Set After Removals
- Maximum Size Subarray Sum Equals k
- Maximum Square Area by Removing Fences From a Field
- Maximum Strictly Increasing Cells in a Matrix
- Maximum Strong Pair XOR I
- Maximum Strong Pair XOR II
- Maximum Students on a Single Bench
- Maximum Subarray Sum With Length Divisible by K
- Maximum Sum of Almost Unique Subarray
- Maximum Sum of Distinct Subarrays With Length K
- Maximum Total Area Occupied by Pistons
- Maximum Total Damage With Spell Casting
- Maximum Unique Subarray Sum After Deletion
- Maximum XOR of Two Numbers in an Array
- Meeting Rooms III
- Merge BSTs to Create Single BST
- Merge Similar Items
- Merge Two 2D Arrays by Summing Values
- Minimize Malware Spread II
- Minimize Malware Spread
- Minimize String Length
- Minimum Absolute Difference Queries
- Minimum Area Rectangle
- Minimum Array Changes to Make Differences Equal
- Minimum Array Length After Pair Removals
- Minimum Common Value
- Minimum Consecutive Cards to Pick Up
- Minimum Cost to Split an Array
- Minimum Deletions to Make Character Frequencies Unique
- Minimum Deletions to Make String K-Special
- Minimum Genetic Mutation
- Minimum Index of a Valid Split
- Minimum Index Sum of Two Lists
- Minimum Length of Anagram Concatenation
- Minimum Length of String After Operations
- Minimum Moves to Make Array Complementary
- Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
- Minimum Number of Groups to Create a Valid Assignment
- Minimum Number of Keypresses
- Minimum Number of Lines to Cover Points
- Minimum Number of Operations to Make Array Continuous
- Minimum Number of Operations to Make Array Empty
- Minimum Number of Operations to Make Elements in Array Distinct
- Minimum Number of Operations to Make Word K-Periodic
- Minimum Number of People to Teach
- Minimum Number of Pushes to Type Word II
- Minimum Number of Steps to Make Two Strings Anagram II
- Minimum Number of Steps to Make Two Strings Anagram
- Minimum Operations to Collect Elements
- Minimum Operations to Make a Subsequence
- Minimum Operations to Make Array Values Equal to K
- Minimum Operations to Make Character Frequencies Equal
- Minimum Operations to Make Elements Within K Subarrays Equal
- Minimum Operations to Make Subarray Elements Equal
- Minimum Operations to Make the Array Alternating
- Minimum Operations to Reduce X to Zero
- Minimum Operations to Write the Letter Y on a Grid
- Minimum Rounds to Complete All Tasks
- Minimum Seconds to Equalize a Circular Array
- Minimum Size Subarray in Infinite Array
- Minimum Substring Partition of Equal Character Frequency
- Minimum Time to Collect All Apples in a Tree
- Minimum Total Cost to Make Arrays Unequal
- Minimum Unlocked Indices to Sort Nums
- Minimum Window Substring
- Missing Number
- Most Common Word
- Most Frequent Even Element
- Most Frequent IDs
- Most Frequent Number Following Key In an Array
- Most Frequent Prime
- Most Frequent Subtree Sum
- Most Popular Video Creator
- Most Stones Removed with Same Row or Column
- N-Repeated Element in Size 2N Array
- Naming a Company
- Next Closest Time
- Next Greater Element I
- Next Greater Numerically Balanced Number
- Node With Highest Edge Score
- Non-decreasing Subsequences
- Number of Arithmetic Triplets
- Number of Atoms
- Number of Beautiful Pairs
- Number of Black Blocks
- Number of Boomerangs
- Number of Different Integers in a String
- Number of Distinct Averages
- Number of Distinct Islands II
- Number of Distinct Islands
- Number of Divisible Substrings
- Number of Divisible Triplet Sums
- Number of Equal Count Substrings
- Number of Equivalent Domino Pairs
- Number of Excellent Pairs
- Number of Flowers in Full Bloom
- Number of Good Pairs
- Number of Good Paths
- Number of Good Ways to Split a String
- Number of Islands II
- Number of Matching Subsequences
- Number of Nodes in the Sub-Tree With the Same Label
- Number of Pairs of Interchangeable Rectangles
- Number of Pairs of Strings With Concatenation Equal to Target
- Number of Same-End Substrings
- Number of Squareful Arrays
- Number of Submatrices That Sum to Target
- Number of Substrings Containing All Three Characters
- Number of Substrings With Fixed Ratio
- Number of Unequal Triplets in Array
- Number of Unique Flavors After Sharing K Candies
- Number of Valid Words for Each Puzzle
- Number of Ways Where Square of Number Is Equal to Product of Two Numbers
- Number of Wonderful Substrings
- Odd String Difference
- Online Election
- Open the Lock
- Operations on Tree
- Optimal Partition of String
- Pairs of Songs With Total Durations Divisible by 60
- Palindrome Pairs
- Palindrome Permutation II
- Palindrome Permutation
- Palindrome Rearrangement Queries
- Parse Lisp Expression
- Partition Labels
- Partition String Into Minimum Beautiful Substrings
- Path Crossing
- Path Sum IV
- People Whose List of Favorite Companies Is Not a Subset of Another List
- Permutation Difference between Two Strings
- Permutation in String
- Points That Intersect With Cars
- Powerful Integers
- Prefix and Suffix Search
- Prison Cells After N Days
- Properties Graph
- Rabbits in Forest
- Random Flip Matrix
- Random Pick Index
- Random Pick with Blacklist
- Range Frequency Queries
- Rank Teams by Votes
- Rank Transform of an Array
- Ransom Note
- Reachable Nodes With Restrictions
- Rearrange Characters to Make Target String
- Rearrange K Substrings to Form Target String
- Rearrange String k Distance Apart
- Rearranging Fruits
- Reconstruct Original Digits from English
- Recover the Original Array
- Redistribute Characters to Make All Strings Equal
- Reduce Array Size to The Half
- Regions Cut By Slashes
- Relative Sort Array
- Relocate Marbles
- Remove Duplicates From an Unsorted Linked List
- Remove Letter To Equalize Frequency
- Remove Zero Sum Consecutive Nodes from Linked List
- Reordered Power of 2
- Reorganize String
- Repeated DNA Sequences
- Replace Elements in an Array
- Replace Question Marks in String to Minimize Its Value
- Replace Words
- Report Spam Message
- Restore the Array From Adjacent Pairs
- Reward Top K Students
- Right Triangles
- Rings and Rods
- Roman to Integer
- Second Largest Digit in a String
- Select K Disjoint Special Substrings
- Sender With Largest Word Count
- Sentence Similarity II
- Sentence Similarity
- Set Matrix Zeroes
- Set Mismatch
- Short Encoding of Words
- Shortest Completing Word
- Shortest Impossible Sequence of Rolls
- Shortest Uncommon Substring in an Array
- Shortest Word Distance II
- Similar String Groups
- Simple Bank System
- Single-Row Keyboard
- Sliding Subarray Beauty
- Sliding Window Median
- Smallest Common Region
- Smallest Integer Divisible by K
- Smallest Missing Integer Greater Than Sequential Prefix Sum
- Smallest Missing Non-negative Integer After Operations
- Smallest Number in Infinite Set
- Smallest Range Covering Elements from K Lists
- Smallest String With Swaps
- Smallest Subtree with all the Deepest Nodes
- Snapshot Array
- Sort Array by Increasing Frequency
- Sort Characters By Frequency
- Sort Features by Popularity
- Sort the People
- Sorted GCD Pair Queries
- Sparse Matrix Multiplication
- Split a String Into the Max Number of Unique Substrings
- Split Array into Consecutive Subsequences
- Split Array with Equal Sum
- Split the Array to Make Coprime Products
- Split the Array
- Stickers to Spell Word
- Stock Price Fluctuation
- String Transforms Into Another String
- Strings Differ by One Character
- Strobogrammatic Number
- Subarray Sum Equals K
- Subarray Sums Divisible by K
- Subarrays Distinct Element Sum of Squares I
- Subarrays with K Different Integers
- Subdomain Visit Count
- Subsequences with a Unique Middle Mode I
- Subsequences with a Unique Middle Mode II
- Substring with Concatenation of All Words
- Substring XOR Queries
- Substrings of Size Three with Distinct Characters
- Substrings That Begin and End With the Same Letter
- Sudoku Solver
- Sum of Beauty of All Substrings
- Sum of Consecutive Subsequences
- Sum of Digit Differences of All Pairs
- Sum of Distances
- Sum of Good Subsequences
- Sum of Imbalance Numbers of All Subarrays
- Sum of Matrix After Queries
- Sum of Remoteness of All Cells
- Sum of Unique Elements
- Swap For Longest Repeated Character Substring
- Synonymous Sentences
- Take K of Each Character From Left and Right
- Task Scheduler II
- Task Scheduler
- The Number of Beautiful Subsets
- The Number of the Smallest Unoccupied Chair
- The Two Sneaky Numbers of Digitville
- Throne Inheritance
- Time Based Key-Value Store
- Top K Frequent Elements
- Top K Frequent Words
- Total Appeal of A String
- Total Characters in String After Transformations I
- Total Characters in String After Transformations II
- Triples with Bitwise AND Equal To Zero
- Tuple with Same Product
- Tweet Counts Per Frequency
- Two Out of Three
- Two Sum III - Data structure design
- Two Sum IV - Input is a BST
- Two Sum
- Ugly Number II
- Uncommon Words from Two Sentences
- Unique 3-Digit Even Numbers
- Unique Email Addresses
- Unique Length-3 Palindromic Subsequences
- Unique Morse Code Words
- Unique Number of Occurrences
- Unique Substrings With Equal Digit Frequency
- Unique Word Abbreviation
- Using a Robot to Print the Lexicographically Smallest String
- Valid Anagram
- Valid Sudoku
- Verifying an Alien Dictionary
- Vertical Order Traversal of a Binary Tree
- Vowel Spellchecker
- Walking Robot Simulation
- Widest Pair of Indices With Equal Range Sum
- Word Break II
- Word Break
- Word Ladder II
- Word Ladder
- Word Pattern II
- Word Pattern
- Word Subsets
- X of a Kind in a Deck of Cards