DHRUV PATHAKK’th Smallest/Largest Element in Unsorted ArrayGiven an array and a number k where k is smaller than the size of the array, we need to find the k’th smallest element in the given array…Feb 12, 2022Feb 12, 2022
DHRUV PATHAKWrite a program to sort the given array — JAVASCRIPTGiven an array of integers. Sort the array by Quick Sort technique.Feb 11, 2022Feb 11, 2022
DHRUV PATHAKWrite a program to reverse the array — JAVASCRIPTGiven an array of integers. Reverse the array using ES6 destructuring property.Feb 11, 2022Feb 11, 2022
DHRUV PATHAKFind the minimum and maximum elements in an arrayGiven an array A of size N of integers. Your task is to find the minimum and maximum elements in the array.Feb 11, 2022Feb 11, 2022
DHRUV PATHAKFind a peak element of the arrayGiven an array of integers. Find a peak element in it. An array element is a peak if it is NOT smaller than its neighbors. For corner…Feb 10, 2022Feb 10, 2022