Arrays • Strings • Bitwise Manip. • Linked List • Queue • Stack • Hash Table • Sorting
Searching • Recursion • Binary Tree • Binary Search Tree • Graph • Dynamic Programming
Numbers •
Favorites
Count : 471
- Ugly Numbers
- Power of x^n
- Insert Interval
- Minimum number of arrows to burst balloons
- Max points on a line
- Reverse an array.
- Maximum and minimum element in the array.
- Kth Smallest Element of Array
- Sort an array of 0s, 1s and 2s
- Sort an array of 0s, 1s and 2s (two pointer approach)
- Move all negative numbers to beginning and positive to end.
- Find the count of union of the two arrays
- Rotate an array by 1 in the clockwise direction
- Print all permutations of array
- Kids with the greatest number of candies
- Create Target Array in the Given Order
- Decompress run length encoded list
- Count items matching a rule
- Widest vertical area between two points
- Rearranging the array elements by sign
- Largest Altitude of biker
- Count Number of Distinct Integers After Reverse
- Triangular Sum of an array
- Jewels in Stones
- Minimum Sum of four digits number after splitting
- Intersection of Multiple Arrays
- Move Zeros
- Matrix Diagonal sum
- Flip an image
- Missing number
- Happy number
- Maximum ice cream
- N unique integers which sum up to zero
- Monotonic Array
- Largest Positive Integer That Exists With Its Negative
- Find Words That Can Be Formed by Characters
- Sort array by parity
- Separate Digits in array
- Third max number
- Is subarray Exists with sum 0
- Lonely Numbers in the array
- Can Place Flowers
- Duplicate Zeros
- Shuffle an array
- Find winner on a tic tac toe game
- Check if every row and column contains all numbers
- Roman to Integer
- Find the Distance Value Between Two Arrays
- Peak Index in a mountain array
- Find a peak element
- Largest Sum Contiguous Subarray (Kadane’s Algorithm)
- Difference of two arrays
- Intersection of two arrays
- 3 Sum
- 2 Sum
- 4 Sum
- Palindrome
- Remove Duplicates from Sorted Array
- Length of last word
- Plus One (adding one to an array representing a large number)
- Pascal's Triangle
- Valid Palindrome String
- Middle Of Threee
- Median of two sorted arrays
- Reverse Integer
- Remove element
- Search in Rotated Sorted Array
- 3 sum closest
- Word Pattern
- Sort Colors
- Build array from permutation
- Shuffle the array
- Queries on Number of Points Inside a Circle
- Strictly Palidromic Number
- Divide Array Into Equal Pairs
- Squares of a sorted array
- Rotate image
- Merge Intervals
- Delete Greatest Value in Each Row
- Sort the students
- Largest Number
- Sort the number of 1 bits
- Check if matrix is X-matrix
- Group anagrams
- Add to array form
- Find all the numbers that disappeared in an array
- Rotate the array
- Find lucky number
- Contains Duplicate II
- Disarrange Balls
- Count rows with max 1
- Relative Sort Array
- Remove One Element to Make the Array Strictly Increasing
- Successful pairs of potions and spells
- Valid mountain array
- Longest mountain array
- Matrix rotation by 90 degree
- Set Matrix Zeros
- Spiral Matrix
- Reshape the matrix
- Search in a matrix
- Is Valid Sudoku
- Sort the matrix diagonally
- String Basics
- Print all permutations of the string
- Subsequences of string
- Longest recurring subsequence of a string
- Add Binary
- Longest Substring Without Repeating Characters
- Find the Index of the First Occurrence in a String
- Maximum number of words found in a sentence
- Defang Ip address
- Restore strings
- Interpret Goal
- Kth Distinct String in an Array
- Merge strings alternatively
- Valid anagram
- Find the difference
- First Unique Character in a String
- Number of good ways to split a string
- Counting words with a given prefix
- Greatest common divisor of strings
- Check distance between same letters
- Number of different integers in the string
- Check whether two string are rotation of each other or not
- Longest Palindromic Substring
- Most common words
- DI String match
- Count prefixes of a given string
- Sort Characters By Frequency
- Count Common Words With One Occurrence
- Rearrange Characters to Make Target String
- Unique Morse Code Words
- Percentage of a letter
- Check if Word Equals Summation of Two Words
- Check if Number Has Equal Digit Count and Digit Value
- Circular Sentence
- Isomorphic strings
- Minimum Index Sum of Two Lists
- Greatest English Letter in Upper and Lower Case
- Second largest digit in a string
- Sort a sentence
- Summary ranges
- Robot return to origin
- Maximum Nesting Depth of the Parentheses
- Reverse prefix of word
- Determine color of a chessboard square
- Partition String
- Minimum number of steps to make two strings anagram
- Goat Latin
- Smallest string with a given numeric value
- Check if a word occurs as a prefix of any word in a sentence
- Count pairs of similar strings
- Add string
- Is Subsequence
- Buddy Strings
- Bulls and cows
- Understanding Bitwise operators.
- Binary Representation of number.
- Find the number that appears once.
- Detect if two integers have opposite signs
- Add 1 to a number when all the arithmetic operators are not allowed
- Mutliply with 3.5 without 'x' and '/' operator
- Turn off the rightmost set bit
- Find whether a given number is a power of 4 or not
- Compute modulus division by a power-of-2-number
- Rotate Bits
- Hamming weights (Number of 1 bits)
- Reverse Bits
- Power Of two
- Bitwise & of numbers in range
- Find the duplicate number
- Party of couples (Find number with odd frequency)
- Check for Integer Overflow
- Count bit flips(Number of bits to be changed to convert one number to another)
- Efficient way to multiply by 7
- Insertion at the end.
- Insertion at the beginning.
- Insertion at the middle of the linked list.
- Deleting the last node.
- Deleting the first node.
- Deleting the middle node.
- Calculating the length of list using iteration and the recursion.
- Searching an item using iteration and recursion.
- Implementation of doubly linked list.
- Creating a circular linked list from scratch.
- Inserting at end and beginning of the circular linked list
- Deleting the last and the first element of the circular linked list.
- Get the Nth node from the last.
- Detecting a loop in a linked list.
- Detecting the length of loop in a linked list. (Using Floyd's Cycle detection algorithm)
- Detect and remove loop from the linked list.
- Check if single linked list is palindrome or not.
- Removing Duplicate elements from unsorted linked list.
- Swapping nodes in a linked list.
- Merge two sorted linked list.
- Add two numbers represented by linked list.
- Rotate a linked list.
- Find the nth node of the linked list from the end.
- Convert binary number in a linked list to an integer.
- Merge nodes in between zeros
- Maximum twin sum
- Odd even linked list
- Remove Linked List Elements
- Design linked list
- Reorder List
- Swap nodes in pairs
- Reverse Linked List II
- Copy Linked list with Random Head
- Remove Duplicates from Sorted List II
- Intersection of two linked list
- Remove nth node from the end of linked list
- Reverse List in K Groups
- Flatten a multilevel doubly linked list
- Next Greater Node in the Linked List
- Double a number represented by a linked list
- Basic operations of queue
- Queue using stack.
- Priority Queue using STL.
- Priority Queue using linked list.
- Create Hashset
- Create Hashmap
- Most Frequent number of following key in an array
- Keyboard Row
- Uncommon Words from Two Sentences
- N-Repeated Element in Size 2N Array
- Rank Transform of an Array
- Find whether an array is a subset of another array
- Union and Intersection of two linked list.
- Given an array A[] and a number x, check for pair in A[] with sum as x
- Minimum delete operations to make all elements of array same.
- Minimum operations to make all elements equal in array.
- Maximum distance between two occurrences of same element in array
- Find duplicates in a given array when elements are not limited to a range
- Smallest subarray with all occurrences of a most frequent element.
- Find elements which are present in first array and not in second array.
- How to check if two subsets are disjoint.
- Non-overlapping sum of two sets.
- Find missing elements of a range.
- Find the kth missing element in increasing sequence which is not present in a given sequence
- Find pair with greatest pair in array.
- Minimum number of subsets with distinct elements
- Remove minimum number of elements such that no common element exist in both array.
- Count items common to both the lists but with different prices.
- Ransom Note : check whether string 1 can be constructed from string 2
- Decode the message
- Maximum Number of Words You Can Type
- Check if a string is pangram
- Merge similar items
- Maximum number of balls in a box
- Two out of three
- Sort array by increaing frequency
- Top K frequent elements
- https://leetcode.com/problems/count-vowel-substrings-of-a-string/description/
- Replace words
- Keep Multiplying Found Values by Two
- Most Frequent Even Element
- Rings and Rods
- Finding the user active minutes
- Subdomain Visit Counts
- Players with zero or one losses
- Equal row and column pairs
- Check whether two strings are almost equivalent
- Distribute candies
- Smallest number in infinite set
- Longest Consecutive Sequence
- Insert delete get random in O(1)
- Design Underground System
- Basic operations of stack.
- Implementing stack using queues.
- Reverse a string using stack.
- Find the middle element of the stack in O(1) complexity.
- Implement stack using a single queue.
- Reverse individual words.
- Next Greater Element
- Next Smaller Element
- Valid parenthesis
- Minimum remove to make valid parentheses
- Design a stack with increment operation
- Baseball game
- Min stack
- Removing stars from a string
- Simply Path
- Evaluate Reverse Polish Notation
- Remove outer parentheses
- Bubble Sort
- Insertion Sort
- Heap Sort
- Merge Sort
- Quick sort
- Unordered Linear Search
- Ordered Linear Search
- Binary Search
- Interpolation search
- Maximum frequency of an element in array
- Factorial using recursion
- Print numbers 1 to N in backwards
- Fibonacci Series
- Binary Search
- Max Num Of Requests
- Letter combination of phone numbers
- Combinations
- Combination sum II
- Subsets
- Creation of Binary Tree
- Traversal in trees : PreOrder, Inorder and Postorder
- Number of nodes in tree
- Level Order Traversal Using Queue
- Deleting a binary tree
- Compute the height of the binary tree using recursion.
- Compute the height of the binary tree without recursion.
- Number of leaf nodes in a binary tree.
- Diameter Of Binary Tree
- PreOrder Traversal without recursion
- Level order traversal II
- Find a Corresponding Node of a Binary Tree in a Clone of That Tree
- Deepest Leave Sum
- To sum tree
- Boundary Traversal
- Top view
- Bottom View
- Diagonal traversal
- Leaf at same level
- Mirror of the tree.
- Preorder Traversal Without Recursion.
- Find the maximum element of the binary tree using recursion.
- Find the maximum element of the bianry tree without recursion.
- Algorithm to search an element in a bianry tree.
- Algorithm to search an element in a binary tree without recursion.
- Finding the deepest node in a binary tree.
- Deletion in binary tree.
- Check if two binary trees are structurally identical.
- Find level with max sum.
- Find the sum of all the nodes in a binary tree.
- Check if two binary trees are mirror of each other.
- Print All Ancestors of a node.
- Print right view of the tree using level order traversal
- Zigzag level order traversal
- Flatten binary tree to linked list
- Construct string from binary tree(Parethesis)
- Reverse odd levels
- Find Elements in a Contaminated Binary Tree
- Remove leaf nodes with a given value
- Evaluate a boolean binary tree
- Increasing Order Search Tree
- Average of levels of binary tree
- Leaf similar trees
- Binary Tree tilt
- Find Bottom Left Tree Value
- Has Path Sum
- Populating Next Right Pointers in Each Node II
- Sum of left leaves
- Binary Trees Max Path Sum
- Lowest Common Ancestor
- Minimum Depth of binary tree
- All nodes distance k in binary tree
- Count complete tree nodes
- Count Nodes Equal to Average of subtree
- Creating a binary search tree.
- Find the maximum and the minimum element of the binary search tree
- Searching in the binary search tree
- Printing the InOrder Predecessor and Successor of an element.
- Validate BST
- Convert Sorted Array to BST
- Kth Smallest element in BST
- Mode in BST
- Two Sum IV - Input is a BST
- Combining elements of two BST in ascending order
- Convert BST to Greater Tree
- Range Sum of BST
- Unique BSTs (catalan numbers)
- Binary Search Tree Iterator
- Creation of adjacency matrix
- Creation of adjacency list
- Using adjacency list to store the weights
- Tranpose of adjacency list
- Breadth first search implementation using queue & adjacency matrix
- Depth first search implementation using stack
- BFS using adjacency list
- DFS using adjacency list
- Prims Algo
- Detect Cycle in directed graph
- Detect Cycle in directed graph (Using Topological Sort)
- Find the center of Star Graph
- Dijsktra Algo using priority queue
- Dijsktra Algo using set
- Bellman ford algo
- Floyd warshall algo
- Connected Components
- Number of provinces
- Number of islands
- Flood Fill
- Rotten Oranges
- Detect a cycle in undirected graph
- 01 Matrix (distance to nearest 0)
- Surrounded Regions
- Number of Enclaves
- Number of unique islands
- Eventual Safe State
- Topological Sort Using DFS
- Topological Sort using Kahns Algo (BFS)
- Course Schedule (Topological Sort)
- Course Schedule II
- Alien Dictionary
- Shortest Path in Direct Acyclic Graph(toposort approach)
- Shortest path in undirected graph having unit distance
- All path from source
- Can Visit All Rooms
- Word Search
- Word Ladder
- Fibonacci Numbers
- Recursive approach
- Memoization approach
- Dynamic approach
- Space optimized approach
- Catalan Numbers
- Recursive approach
- DP approach
- Binomial coefficient approach
- Nth Catalan number
- Minimum operations
- Coin change
- Permutations
- Number of ways to cover distance
- Longest Common Subsequence
- Frog Jump
- Recursive approach
- Memoization approach
- Dynamic approach
- Space optimized approach
- Nth Tribonacci Number
- Min cost climbing stairs
- Jump Game
- Factorial Trailing Zeroes
- Put Marbles in Bags
- Find Duplicates
- Xor Beauty
- 'Verifying an alien dictionary'
- Zigzag Conversion
- Permutations in string
- Find All Anagrams in a String
- Total fruits
- Maximum number of balloons
- Jump Game II
- Naming a company
- As Far from Land as Possible
- Count Odd Numbers in an Interval Range
- Replace Elements with Greatest Element on Right Side
- Missing Number
- Max Product Of Subarray
- Boats to save people
- Minimize & maximum of array
- Teemo Attacking
- Divisor Game
- Sqrt(x)
- LRU Cache
- First missing positive
- Frequency of limited range elements
- wo Sum II - Input Array Is Sorted
- Excel Sheet Column Number