Top "Sorting" questions

Sorting is the process of applying some order to a collection of items.

Sorted collection in Java

I'm a beginner in Java. Please suggest which collection(s) can/should be used for maintaining a sorted list in …

java sorting collections
Sorting a list with stream.sorted() in Java

I'm interested in sorting a list from a stream. This is the code I'm using: list.stream() .sorted((o1, o2)…

java list sorting java-stream
Java 8 stream reverse order

General question: What's the proper way to reverse a stream? Assuming that we don't know what type of elements that …

java list sorting java-8 java-stream
Sort hash by key, return hash in Ruby

Would this be the best way to sort a hash and return Hash object (instead of Array): h = {"a"=>1, "…

ruby sorting hashmap
SQL Query - Using Order By in UNION

How can one programmatically sort a union query when pulling data from two tables? For example, SELECT table1.field1 FROM …

sql ms-access sorting sql-order-by union
C library function to perform sort

Is there any library function available in C standard library to do sort?

c sorting
orderBy multiple fields in Angular

How to sort by using multiple fields at same time in angular? fist by group and then by sub-group for …

javascript angularjs sorting angularjs-ng-repeat angularjs-orderby
How do I Sort a Multidimensional Array in PHP

I have CSV data loaded into a multidimensional array. In this way each "row" is a record and each "column" …

php sorting multidimensional-array
Sorting a tab delimited file

I have a data with the following format: foo<tab>1.00<space>1.33<space>2.00<tab&…

linux unix sorting tab-delimited
Is there a way to 'uniq' by column?

I have a .csv file like this: [email protected],2009-11-27 01:05:47.893000000,example.net,127.0.0.1 [email protected],2009-11-27 00:58:29.793000000,example.…

linux shell sorting uniq