questions on data structures and algorithms from leetcode hackerrank,geeksforgeeks,hackerearth etc
problems are solved in python(3)
- Delete without head pointer
- Multiply left and right array sum
- Merge Without Extra Space
- get nth ugly number
- Minimum number of jumps
- Nuts and Bolts Problem
- Sum of elements in a matrix
- Multiply left and right array sum
- Cyclically rotate an array by one
- Union of two arrays
- Delete without head pointer
- Sort an array of 0s, 1s and 2s
- Move all negative numbers to beginning and positive to end with constant extra space
- Common elements
- Count pairs with given sum
- Subarray with 0 sum
- Rearrange array in alternating positive & negative items with O(1) extra space
- Maximum Product Subarray
- Factorials of large numbers
- Longest consecutive subsequence
- Array Subset of another array
- Triplet Sum in Array
- Count More than n/k Occurences
- Maximum profit by buying and selling a share at most twice
- Trapping Rain Water
- Chocolate Distribution Problem
- Smallest subarray with sum greater than x
- Find subarray with given sum with negatives allowed in constant space
- Three way partitioning
- Arrange given numbers to form the biggest number
- Longest Increasing Subsequence
- Spirally traversing a matrix
- Row with max 1s
- Median in a row-wise sorted Matrix
- Sorted matrix
- Max rectangle
- Find a specific pair in Matrix
- Kth element in Matrix
- Rotate a matrix by 90 degree in clockwise direction without using any extra space
- Common elements in all rows of a given matrix
- ZigZag Conversion
- Remove Duplicates from Sorted Array
- Move Zeroes
- Haystack needle
- Search Insert Position
- Find First and Last Position of Element in Sorted Array
- Maximum Subarray
- Find Duplicate
- Merge Intervals
- Next Permutation
- Best Time to Buy and Sell Stock
- Hand of Straights
- Search a 2D Matrix
- Palindrome String
- Print all the duplicates in the input string
- A Program to check if strings are rotations of each other or not
- Longest Palindrome in a String
- Longest Repeating Subsequence
- Word Wrap
- Next Permutation
- Parenthesis Checker
- Edit Distance
- Longest Prefix Suffix
- String Without AAA or BBB
- Reverse String
- Count and Say
- Longest Common Subsequence
- Distinct Subsequences
- Swap and Maximise
- Replace Spaces
- Longest Increasing Subsequence
- Waiter
- Bubble Sort
- Selection Sort
- Insertion Sort
- Quick Sort
- Merge Sort
- Radix Sort
- Bin/Bucke Sort
- Shell Sort
- Compare the Triplets
- Diagonal Difference
- Plus Minus
- Mini-Max Sum
- Birthday Cake Candles
- Staircase
- Number Line Jumps
- Maximum Element
- Balanced Brackets
- Largest Rectangle
- Charged Up Array
- Maximize the modulo function
- Minimum operations
- In an array
- Evaluation of Postfix Expression
- Check if a string is a subsequence of another string
- Next Greater Element
- Rearrange an array with O(1) extra space (Array)
- Rearrange Array Alternately (Array)
- Count divisors of product of array elements (Array)
- Find element occuring once when all other are present thrice (Array)
- Longest Even Length Substring (String)
- Print Anagrams Together (String)
- Shortest Common Supersequence (String)
- Remove Duplicate Letters (string)
- Find the Difference (string)
- Longest Substring Without Repeating Characters (string)
- Peak Element