Top "Sorting" questions

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

Sort rows in data.table in decreasing order on string key `order(-x,v)` gives error on data.table 1.9.4 or earlier

Let's say I have the following data.table in R: library(data.table) DT = data.table(x=rep(c("b","…

r string sorting data.table key
Sort Java Collection

I have a Java collection: Collection<CustomObject> list = new ArrayList<CustomObject>(); CustomObject has an id field …

java sorting collections
Find unique lines

How can I find the unique lines and remove all duplicates from a file? My input file is 1 1 2 3 5 5 7 7 I would …

linux sorting unique uniq
using lodash .groupBy. how to add your own keys for grouped output?

I have this sample data returned from an API. I'm using Lodash's _.groupBy to convert the data into an object …

javascript sorting underscore.js grouping lodash
How to sort 2 dimensional array by column value?

Can any one help me sort a 2 dimensional Array in JavaScript? It will have data in the following format: [12, AAA] [58, …

javascript arrays sorting multidimensional-array
Sort dataGridView columns in C# ? (Windows Form)

I have a datagridview that i bind from an sql table, in that dv i have those attributes: Id, Name …

c# winforms datagridview sorting grid
Sorting an ArrayList of objects using a custom sorting order

I am looking to implement a sort feature for my address book application. I want to sort an ArrayList<…

java sorting collections arraylist
How to sort an array of objects by multiple fields?

From this original question, how would I apply a sort on multiple fields? Using this slightly adapted structure, how would …

javascript arrays sorting
Sorting Characters Of A C++ String

If i have a string is there a built in function to sort the characters or would I have to …

c++ string sorting
Why does "return list.sort()" return None, not the list?

I've been able to verify that the findUniqueWords does result in a sorted list. However, it does not return the …

python list sorting return