This repo contains some problems from different popular coding platforms like Code Chef, Leet Code, Hacker Blocks, Interview Bit and Hackerrank. If you like this repo, then don't forget to put a star ✰
- Maximum Sub Array
- Maximum Sum Circular Sub Array
- Merge Sorted array
- Pallindrome Number
- Reverse Integer
- Trapping rain Water
- Two Sum
- Rotate Image
- Roman To Integer
- Search Insert Position
- Spiral Matrix
- Spiral Matrix II
- Longest Substring Without Repeating Characters
- Add Two Numbers
- Longest Common Prefix
- Container With Most Water
- 3Sum
- Plus One
- Remove Duplicates From Sorted Array
- Remove Element
- Move Zeroes
- Binary Tree Level Order Traversal II
- Prison Cells After N Days
- Ugly Number II
- Hamming Distance
- Island Perimeter
- Maximum Width Of Binary Tree
- Flatten a Multilevel Doubly Linked List
- Subsets
- Reverse Bits
- Same Tree
- Angle Between Hands of a Clock
- Reverse Words In A String
- Pow(x,n)
- Top K Frequent Elements
- Course Schedule II
- Add Binary
- Remove Linked List Elements
- Words Search
- Binary Tree Zigzag Level Order Traversal
- Single Number III
- All Paths From Source to Target
- Find Minimum In Rotated Sorted Array
- Find Minimum In Rotated Sorted Array II
- Single Number
- Add Digits
- Construct Binary Tree from Inorder and Postorder Traversal
- Best Time to Buy and Sell Stock with Cooldown
- Word Break II
- Climbing Stairs
- Detect Capital
- Design Hashset
- Power Of Four
- Find All Duplicates in an Array
- Path Sum III
- Excel Sheet Column Number
- Iterator for Combination
- Longest Palindrome
- Sort Array By Parity
- Find The Duplicate Number
- Missing Number
- Remove Duplicates From A Sorted Array
- Fizz Buzz
- Rotate Array
- Contains Duplicate
- Move Zeroes
- Delete Node From BST
- All Elements in Two Binary Search Trees
- Valid Parentheses
- Valid Anagrams
- Reverse String
- First Unique Character in a String
- Find First and Last Position of Element in Sorted Array
- Binary Search Tree Iterator
- Binary Tree Inorder Traversal
- Binary Tree Level Order Traversal
- N-ary Tree Level Order Traversal
- N-ary Tree Preorder Traversal
- Binary Tree Preorder Traversal
- N-ary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Implement Queue using Stacks
- Implement Stack using Queues
- Remove Nth Node From End of List
- Convert Sorted Array to Binary Search Tree
- Insert Interval
- Minimum Window Substring
- Minimum Size Subarray Sum
- Sliding Window Maximum
- Permutation in String
- Find All Anagrams in a String
- Unique Paths
- Unique Paths II
- Minimum Path Sum
- Maximum Depth of Binary Tree
- Remove Duplicates from Sorted Array II
- Invert Binary Tree
- Longest Increasing Subsequence
- Product of Array Except Self
- Best Time to Buy and Sell Stock
- Merge k Sorted Lists
- Merge 2 Sorted Lists
- Longest Repeating Character Replacement
- Max Consecutive Ones III
- Maximum Non Negative Product in a Matrix
- Number of Good Ways to Split a String
- Generate Parentheses
- Letter Combinations of a Phone Number
- Combination Sum
- Reverse Nodes in k-Group
- Swap Nodes in Pairs
- Reverse Linked List
- Recover Binary Search Tree
- Count Good Nodes in Binary Tree
- Binary Tree Right Side View
- Construct Binary Tree from Preorder and Inorder Traversal
- Element Appearing More Than 25% In Sorted Array
- Counting Bits
- Search in Rotated Sorted Array
- Number of Recent Calls
- Kth Smallest Element in a BST
- Valid Palindrome
- Insert into a Binary Search Tree
- Linked List Cycle
- Linked List Cycle II
- Odd Even Linked List
- Number of 1 Bits
- Power of Two
- Bitwise AND of Numbers Range
- Convert Binary Number in a Linked List to Integer
- Add Two Numbers II
- Implement strStr()
- Subarray Sum Equals K
- Subarray Product Less Than K
- Summary Ranges
- Count Primes
- Happy Number
- Contains Duplicate II
- Isomorphic Strings
- Word Pattern
- Length of Last Word
- Majority Element
- Majority Element II
- Two Sum II - Input array is sorted
- Find Peak Element
- Gray Code
- First Missing Positive
- Remove Duplicates from Sorted List
- Remove Duplicates from Sorted List II
- Concatenation of Array
- Sum of All Odd Length Subarrays
- Set Matrix Zeroes
- Delete Node in a Linked List
- Kth Largest Element in an Array
- Longest Mountain in Array
- Valid Mountain Array
- Split Linked List in Parts
- Rotate List
- Maximum Number of Balloons
- Maximum Absolute Sum of Any Subarray
- Sort Characters By Frequency
- Ransom Note
- Balanced Binary Tree
- Populating Next Right Pointers in Each Node
- Validate Binary Search Tree
- Top K Frequent Words
- Sender With Largest Word Count
- DI String Match
- Left and Right Sum Differences
- Maximum Value of a String in an Array
- Maximum Number of Words You Can Type
- Largest Local Values in a Matrix
- Minimum Number of Operations to Move All Balls to Each Box
- Watering Plants
- Destination City
- Count the Number of Consistent Strings
- Find the Prefix Common Array of Two Arrays
- Group the People Given the Group Size They Belong To
- Removing Stars From a String
- Build an Array With Stack Operations
- Validate Stack Sequences
- Daily Temperatures
- Minimum Remove to Make Valid Parentheses
- Substrings of Size Three with Distinct Characters
- Make The String Great
- Final Prices With a Special Discount in a Shop
- Remove All Adjacent Duplicates In String
- Remove All Adjacent Duplicates in String II
- Time Needed to Buy Tickets
- Convert an Array Into a 2D Array With Conditions
- Optimal Partition of String
- Find and Replace Pattern
- Subdomain Visit Count
- Minimum Number of Arrows to Burst Balloons
- Substring with Concatenation of All Words
- Is Subsequence
- Longest Consecutive Sequence
- Append Characters to String to Make Subsequence
- Maximum Number of Vowels in a Substring of Given Length
- Minimum Recolors to Get K Consecutive Black Blocks
- Length of the Longest Alphabetical Continuous Substring
- Partition List
- Maximum Twin Sum of a Linked List
- Alphabet Board Path
- Merge In Between Linked Lists
- Valid Sudoku
- Merge Intervals
- House Robber
- Jump Game
- Jump Game II
- Fibonacci Number
- Minimum Add to Make Parentheses Valid
- LRU Cache
- Permutations II
- Find the Pivot Integer
- Custom Sort String
- Maximum Ice Cream Bars
- Sum In A Matrix
- Maximum Sum With Exactly K Elements
- Arithmetic Subarrays
- Combinations
- Minimum Flips to Make a OR b Equal to c
- Letter Case Permutation
- Gas Station
- N-Queens
- N-Queens II
- Sudoku Solver
- Boats to Save People
- The k Strongest Values in an Array
- Maximum Erasure Value
- Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold
- Word Break
- Copy List with Random Pointer
- Manmohan Loves Pattern - I
- Manmohan Loves Pattern - II
- Von Neumann Loves Binary
- Fibonacci Pattern (Pattern 4)
- Pattern Triangle
- Pattern With Zeroes
- Help Ramu
- Decimal To Octal
- Binary To Decimal
- Pythagoren Triplet
- Mountain Pattern
- Pattern Double Sided Arrow
- Pattern Inverted Hour Glass
- Hollow Diamond Pattern
- Activity Selection Problem
- Wave Print Column Wise
- Target Sum Pairs
- Target Sum Triplets
- Rain Water Harvesting
- Maximum Subarray Sum
- Maximum Circular Sum
- Maximum Length Bitonic Subarray
- Spiral Print Anticlockwise
- Rotate Image
- Form Biggest Number
- Broken Calculator
- Matrix Search
- Sum of Two Arrays
- Median of Sorted Arrays
- Difference in ASCII Codes
- Ultra Fast Mathematics
- Max Frequency Characters
- String Compression
- Is Palindrome
- Sanket And Strings
- Can You Read This?
- Piyush And Magical Park
- Kth Root
- Book Allocation Problem
- Sorting In Linear Time
- Aggressive Cows
- Painter's Problem
- Winning CB Scholarship
- String Sort
- Help Rahul To Search
- Playing With Bits
- Unique Number - I
- XOR Profit Problem
- Unique Number - II
- Unique Number - III
- Modular Exponentiation
- Prateek Loves Candy
- Find Last Element
- All Indices Problem
- Replace PI
- Towers Of Hanoi
- Duplicate Character Formatting
- Remove Duplicates
- Subsequences
- Smart Keypad - I
- Smart Keypad - Advanced
- Dictionary Order (Larger)
- Dictionary Order (Smaller)
- Subset Sum Easy
- Convert String To Integer
- Keypad Codes
- Mapped Strings
- Sorted Array
- Move All X At End
- Tricky Permutations
- Generate Parentheses
- Count N Queen
- Rat In A Maze
- Sudoku Solver
- Linked List K Append
- Merge Sorted Linked List
- Linked List K Reverse
- Even After Odd LL
- Kth Element from The Last In A LL
- Cycle Detection And Removal In A Linked List
- Intersection Point Of Two Linked List
- Circular Linked List
- Palindrome Linked List
- Find The Greater Element
- Prateek Sir and Coding
- Balanced Parenthesis
- Stock Span
- I Am Very Busy Man
- Redundant Parentheses
- Queue Using Stack
- Strongest Fighter
- Importance Of Time
- Build BST
- Sum At Level K
- Print BST keys in the Given Range
- Tree Bottom View
- Is Balanced Binary Tree
- Level Order (ZigZag)
- Create tree from Inorder and Preorder
- Replace With Sum of Greater Nodes
- Tree Top View
- Tree Left View
- Tree Right View
- Largest BST in a Binary Tree
- Recover BST
- Hostel Visit
- Merge K sorted Arrays
- Max Sum Contiguous Subarray
- Add One To Number
- Spiral Order Matrix II
- Min Steps To Infinite Grid
- Triplets With Sum Between Given Range
- Largest Number
- Max Non Negative Subarray
- Longest Common Prefix
- Usain Bolt vs Tiger
- Is this a give away
- Khaled in HIT
- Weapon Value
- Compress The List
- Cache Hit
- Chef And Demonetisation
- Chefina And Swaps
- Doctor Chef
- Missing A Point
- Ada King
- Chef And Card Game
- Chef And Strings
- Even-tual Reduction
- What Is This, a Crossover Episode
- Chef Wars - Return of the Jedi
- Chef and Linear Chess
- Another Card Game Problem
- Smallest KMP
- Chef and Wedding Arrangements
- Chef And Work
- Chopsticks
- Mode Of Frequencies
- A Problem On Sticks
- Ada Matrix
- Chefina and Swap
- Isolation Centres
- Bowling Strategy
- Chef and Easy Queries
- Covid Run
- Positive AND
- Replace for X
- Ada and Dishes
- Restore Sequence
- Iron, Magnet and Wall
- Vaccine Production
- Chef and Division 3
- Encoded String
- Maximum Production
- Relativity
- XxOoRr
- Smallest Divisible Number
- Addition Under Modulo
- Digits In Factorial
- Exactly 3 Divisors
- Remove duplicate elements from sorted Array
- Reverse array in groups
- Height of Binary Tree
- Unique Numbers
- Delete without head pointer
- Count Leaves in Binary Tree
- Minimum number to form the sum even
- Count the Zeros
- Reverse a String
- Sum of numbers in string
- Red OR Green
- Closing bracket index
- Case-specific Sorting of Strings
- Min Heap Implementation
- Minimum indexed character
- Count Leaves in Binary Tree
- Aggressive Cows
- I Am Very Busy Man
- Biased Standings
- Load Balancing
- Defense Of A Kingdom
- Transform The Expression
- TEST - Life, the Universe, and Everything
- The Last Digit
- Arranging Amplifiers
- Mini-Max Sum
- Simple Array Sum
- Repeated String
- Sock Merchant
- Counting Valley
- Jumping On Clouds
- Ransom Note
- Two Strings
Want to contribute to this repo?
-
The code must be written in C++
-
The file must contain the Question along with the Solution (Check one file before making a pull request)
-
Update README accordingly
Lets take a moment for those lovely contributors ❤️