Given an array of integers, sort it using selection sort algorithm. Selection sort is a unstable, in-place sorting algorithm known for its simplicity, and it has performance advantages over more complicated algorithms in certain situations, particularly where auxiliary memory is limited. It can be implemented as a stable sort.
Given an array of integers, sort it using insertion sort algorithm. Insertion sort is stable, in-place sorting algorithm that builds the final sorted array one item at a time.
Given an array of integers, find minimum product among all combinations of triplets in the array.
Given M sorted lists each containing N elements, print them in sorted order efficiently.
Given an array of integers, sort it using heap sort algorithm in C, C++ and Java.
Lexicographic sorting: Given a set of strings, print them in Lexicographic order (dictionary/alphabetical order).
In Activity Selection Problem, we’re given a set of activities and the starting & finishing time of each activity, we need to find the maximum number of activities that can be performed by a single person assuming that a person can only work on a single activity at a time.
In this article, we will discuss various methods to sort array of integers (or any other primitive type) in Java.
In this post, we will discuss several ways to sort list in reverse order in Java. The given list is modifiable, but not necessarily resizable.
In this post, we will discuss various methods to sort Map in Java according to the natural ordering of its keys.
In this post, we will discuss several ways to sort List in ascending order in Java. Assume the specified list is modifiable, but not necessarily resizable.
In this article, we will discuss various methods to sort an array of strings in Java.