Explore various approaches for sorting a list based on the order of elements in another list.
Search Results for: sort
How to Sort LinkedHashMap by Values in Java
Explore how to sort a LinkedHashMap by values in Java.
Time Complexity of Java Collections Sort in Java
Explore thе Collеctions.sort() timе complеxity using Java Microbеnchmark Harnеss (JMH).
Difference Between Arrays.sort() and Collections.sort()
Compare two Java’s commonly used sorting methods: Arrays.sort() and Collections.sort().
Sorting Java Map in Descending Order
A quick and practical guide to sorting Java Map in descending order.
Why There Is No Sorted List in Java?
A quick but comprehensive explanation of why there’s no SortedList in Java.
Sort Date Strings in Java
Explore different approaches to effectively sorting date strings in Java.
Sorting a HashSet in Java
Learn multiple techniques to sort the elements of a HashSet.
Sort Collection of Objects by Multiple Fields in Java
Learn different approaches for sorting collections by comparing multiple fields.
Gravity/Bead Sort in Java
Learn about the gravity sort (a.k.a. bead sort) algorithm and understand its single-threaded implementation in Java.
Sort a List Alphabetically in Java
Learn how to sort elements in Java collections.
Sorting Objects in a List by Date
Learn how to sort a Java Collection by Date object in both ascending and descending modes.
Case Insensitive Sorting in MongoDB
MongoDB’s default lexical sorting may not be suitable for all purposes. Here we look at a couple of techniques for sorting to keep letters together even if they’re in a mix of upper and lowercase.
Find the Kth Smallest Element in Two Sorted Arrays in Java
A quick and practical guide to finding the k-th smallest element in two sorted arrays.
Partitioning and Sorting Arrays with Many Repeated Entries with Java Examples
Learn different ways to partition and sort an array containing many repeated entries.
Efficiently Merge Sorted Java Sequences
Learn how we can efficiently merge sorted arrays using a min-heap
Arrays.sort vs Arrays.parallelSort
Learn how Java sort() and parallelSort() differ.
How to Merge Two Sorted Arrays in Java
Learn how to merge two sorted arrays in Java.
Bucket Sort in Java
A quick and practical overview of Bucket Sort algorithm in Java.
Radix Sort in Java
Learn about the Radix sort algorithm and implement it in Java.