Top "Sorting" questions

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

Sorting object property by values

If I have a JavaScript object such as: var list = { "you": 100, "me": 75, "foo": 116, "bar": 15 }; Is there a way to sort …

javascript sorting properties object
How do I sort a list of dictionaries by a value of the dictionary?

I have a list of dictionaries and want each item to be sorted by a specific value. Take into consideration …

python list sorting dictionary data-structures
List<T> OrderBy Alphabetical Order

I'm using C# on Framework 3.5. I'm looking to quickly sort a Generic List<T>. For the sake of …

c# generics list lambda sorting
How to sort a list/tuple of lists/tuples by the element at a given index?

I have some data either in a list of lists or a list of tuples, like this: data = [[1,2,3], [4,5,6], [7,8,9]] data = [(1,2,3), (4,5,6), (7,8,9)] And …

python list sorting tuples
Python list sort in descending order

How can I sort this list in descending order? timestamp = [ "2010-04-20 10:07:30", "2010-04-20 10:07:38", "2010-04-20 10:07:52", "2010-04-20 10:08:22", "2010-04-20 10:08:22", "2010…

python sorting reverse
How do you sort a dictionary by value?

I often have to sort a dictionary, consisting of keys & values, by value. For example, I have a hash …

c# .net sorting dictionary
How to sort an ArrayList in Java

I have a class named Fruit. I am creating a list of this class and adding each fruit in the …

java sorting collections arraylist
How does one reorder columns in a data frame?

How would one change this input (with the sequence: time, in, out, files): Time In Out Files 1 2 3 4 2 3 4 5 To this output (…

r sorting dataframe r-faq
Sort JavaScript object by key

I need to sort JavaScript objects by key. Hence the following: { 'b' : 'asdsad', 'c' : 'masdas', 'a' : 'dsfdsfsdf' } Would become: { 'a' : …

javascript sorting
How to sort a list of objects based on an attribute of the objects?

I've got a list of Python objects that I'd like to sort by an attribute of the objects themselves. The …

python list sorting oop count