Top "Sorting" questions

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

jQuery table sort

I have a very simple HTML table with 4 columns: Facility Name, Phone #, City, Specialty I want the user to be …

jquery sorting html-table
Why does my sorting loop seem to append an element where it shouldn't?

I am trying to sort an array of Strings using compareTo(). This is my code: static String Array[] = {" Hello ", " This ", "…

java arrays sorting
How to sort a HashSet?

For lists, we use the Collections.sort(List) method. What if we want to sort a HashSet?

java sorting collections set hashset
How to sort with lambda in Python

In Python, I am trying to sort by date with lambda. I can't understand my error message. The message is: &…

python sorting functional-programming anonymous-function
Sorting arraylist in alphabetical order (case insensitive)

I have a string arraylist names which contains names of people. I want to sort the arraylist in alphabetical order. …

java sorting arraylist
How to sort an array in descending order in Ruby

I have an array of hashes: [ { :foo => 'foo', :bar => 2 }, { :foo => 'foo', :bar => 3 }, { :foo => 'foo', :bar =&…

ruby sorting
Quick Sort Vs Merge Sort

Why might quick sort be better than merge sort ?

algorithm sorting
Sorting a vector in descending order

Should I use std::sort(numbers.begin(), numbers.end(), std::greater<int>()); or std::sort(numbers.rbegin(), numbers.…

c++ sorting stl vector iterator
How do I use Comparator to define a custom sort order?

I want to develop a sorting demo for car list. I am using data table to display car list. Now …

java sorting enums
Simple bubble sort c#

int[] arr = {800,11,50,771,649,770,240, 9}; int temp = 0; for (int write = 0; write < arr.Length; write++) { for (int sort = 0; sort < arr.Length - 1; …

c# arrays sorting bubble-sort