this repository contains Problems (with its solutions) related to Data Structures and Algorithms that are asked in coding interview
- Day 1- return whether any two numbers from the list add up to k.
- Day 2- Unival Tree
- Day 3- Sieve of Eratosthenes
- Day 4- Minimum number of swaps required for arranging pairs adjacent to each other
- Day 5- Rearrange characters in a string such that no two adjacent are same
- Day 6- Minimum removals required to make intervals non-overlapping
- Day 7- determine how many pairs of the line segments intersect
- Day 8- reverse a directed graph
- Day 9- longest subarray where all its elements are distinct
- Day 10- find minimum element in rotated sorted array
- Day 11- swap every two nodes in singly linked list
- Day 12- Determine whether there exists a one-to-one mapping
- Day 13- Given a circular array, compute its maximum subarray sum in O(n) time
- Day 14- Implement a stack API using only a heap/priority queue
- Day 15- shortest unique prefix
- Day 16- find all starting indices in String which are anagrams
- Day 17- GCD of n numbers
- Day 18- find the majority element, which appears more than half the time of length of array
- Day 19- minimum level sum
- Day 20- largest subset that has every pair of elements that satisfies either i % j = 0 or j % i = 0
- Day 21- swap even and odd bits of unsigned 8 bit integer
- Day 22- smallest distance between any two words in string
- Day 23- determine whether any permutation of string is a palindrome.
- Day 24- shortest interval that covers all the intervals
- Day 25- find duplicate (Pigeon hole principle)
- Day 26- check if brackets are balanced
- Day 27- swapping bits
- Day 28- find square roots
- Day 29- n-bit Gray Codes
- Day 30- minimum edit distance
- Day 31- clone singly linked list with random pointers
- Day 32- validate binary search tree
- Day 33- Two Sum in BST
- Day 34- rotate linked list to kth place
- Day 35- Singleton pattern with a twist
- Day 36- Count frequency of each character in a string generated according to Markov Chain
- Day 37- implement sparse array
- Day 38- Find Permutations
- Day 39- Minimum Sum Path in Binary Tree
- Day 40- two unique elements in duplicates
- Day 41- Minimally Connected Graph (Tree)
- Day 42- minimum steps needed to reach end
- Day 43- total flips for n coins
- Day 44- Next Greater permutation (lexicographic order)
- Day 45- level order traversal of binary tree
- Day 46- nearest largest integer
- Day 47- generate a number according to its probability
- Day 48- uber question- direction and position rule verification
- Day 49- partial equal subset sum
- Day 50- Check if word is present in 2D-matrix horizontally or vertically
- Day 51- Given a function f, and N return a debounced f of N milliseconds.
- Day 52- Find nth perfect number whose sum of digits is 10
- Day 53- print matrix spirally
- Day 54- partition the linked list so that all nodes less than k come before nodes greater than or equal to k
- Day 55- square the integers of sorted list and return list in sorted order
- Day 56- merge overlapping intervals
- Day 57- calculates the maximum profit you could have made from buying and selling stock
- Day 58- merge K sorted Lists
- Day 59- Restore IP Adresses
- Day 60- Check if brackets are balanced
- Day 61- longest increasing subsequence
- Day 62- Encode and decode the string
- Day 63- return x if b=1, return y if b=0 only using mathematical or bit operations
- Day 64- find the intersecting node in two singly linked list
- Day 65- find indexes of Palindrome Pairs
- Day 66- determine whether linked list is palindrome or not
- Day 67- Implement division of integers without using *, /, % operators
- Day 68- Implement integer exponentiation. That is, implement the pow(x, y) function
- Day 69- Find minimum number of rooms required (Meeting rooms II)
- Day 70- Implement data structure for e-commerce site
- Day 71- Implement Bit Array
- Day 72- String can be shifted to get other string? (Rotate String)
- Day 73- Longest Consequtive Sequence
- Day 74- Minimum Coins needed to get sum (Coin Change)
- Day 75- Maximum Path Sum (one Node to another Node)
- Day 76- return Nth fibnacci sequence (classic fibonacci series)
- Day 77- return true if array can become nondecrease by modifying 1 element
- Day 78- get a random number from 0 to n-1 numbers excluding some numbers