coding-examples-final-450-by-love-babbar

Solutions for final 450 questions by Love Babbar in JavaScript

This project is maintained by rupeshtiwari

Final 450 Questions by Love Babbar

I tried to put solutions in JavaScript whoever interested can get benefit out of this project.

Pull Requests are Welcome

Feel free to create pull request for improvements and corrections.

Getting and running project

# Run git clone
git clone 'url of this project'

# Run npm ci
npm ci

# Run specs
npm test

Array Problems

Check all array solution files here

Array Reverse the array
Array Find the maximum and minimum element in an array
Array Find the “Kth” max and min element of an array
Array Given an array which consists of only 0, 1 and 2. Sort the array without using any sorting algo
Array Move all the negative elements to one side of the array
Array Find the Union and Intersection of the two sorted arrays.
Array Write a program to cyclically rotate an array by one.
Array find Largest sum contiguous Subarray [V. IMP]
Array Minimise the maximum difference between heights [V.IMP]
Array Minimum no. of Jumps to reach end of an array
Array find duplicate in an array of N+1 Integers
Array Merge 2 sorted arrays without using Extra space.
Array Kadane’s Algo [V.V.V.V.V IMP]
Array Merge Intervals
Array Next Permutation
Array Count Inversion
Array Best time to buy and Sell stock
Array find all pairs on integer array whose sum is equal to given number
Array find common elements In 3 sorted arrays
Array Rearrange the array in alternating positive and negative items with O(1) extra space
Array Find if there is any subarray with sum equal to 0
Array Find factorial of a large number
Array find maximum product subarray
Array Find longest coinsecutive subsequence
Array Given an array of size n and a number k, fin all elements that appear more than “ n/k “ times.
Array Maximum profit by buying and selling a share atmost twice
Array Find whether an array is a subset of another array
Array Find the triplet that sum to a given value
Array Trapping Rain water problem
Array Chocolate Distribution problem
Array Smallest Subarray with sum greater than a given value
Array Three way partitioning of an array around a given value
Array Minimum swaps required bring elements less equal K together
Array Minimum no. of operations required to make an array palindrome
Array Median of 2 sorted arrays of equal size
Array Median of 2 sorted arrays of different size