# Category Archives: Sorting

Given an integer K denoting the fuel tank capacity of a car running at the cost of 1 liter / mtr on a straight path… Read More
Given an array arr[] of size N, the task is to find the maximum value of arr[i] ∗ arr[j] + arr[i] − arr[j] for any… Read More
Given an array arr[] of size N, the task is to find the price of the item such that the profit earned by selling the… Read More
https://media.geeksforgeeks.org/wp-content/cdn-uploads/20210225121659/hoare.mp4 GUI(Graphical User Interface) helps in better understanding than programs. In this article, we will visualize Quick Sort using JavaScript. We will see how the… Read More
GUI(Graphical User Interface) helps in better in understanding than programs. In this article, we will visualize Bucket Sort using JavaScript. We will see how the… Read More
GUI(Graphical User Interface) helps in better in understanding than programs. In this article, we will visualize Quick Sort using JavaScript. We will see how the… Read More
GUI(Graphical User Interface) helps in better in understanding than programs. In this article, we will visualize Heap Sort using JavaScript. We will see how the… Read More
Given an integer N, the task is to sort the digits in ascending order. Print the new number obtained after excluding leading zeroes. Examples: Input:… Read More
Given three positive integers L, R, and K, the task is to find the number from the range [L, R] which requires Kth smallest number… Read More
Insertion sort is a simple sorting algorithm in which values from the unsorted part are picked and placed at the correct position in the sorted… Read More
Given an array arr[] of size N (consisting of duplicates), the task is to check if the given array can be converted to a non-decreasing… Read More
GUI(Graphical User Interface) helps in better in understanding than programs. In this article, we will visualize Counting Sort using JavaScript. We will see how the… Read More
Given an array arr[] consisting of N integers, the task is to find the length of the longest non-decreasing subsequence such that the difference between… Read More
Given a square matrix mat[][] of size N * N, the task is to calculate XOR value of every diagonal elements and find the Kth… Read More
Given an array arr[] consisting of N integers and an integer X, the task is to find the minimum cost required to make all array… Read More