} //O(N**2) public void sortCustomerOrder(ref LinkedList <CustomerOrder> allCustomerOrder) { if (allCustomerOrder.Count == 0) { return; } CustomerOrder temp = allCustomerOrder.ElementAt(0); for (int sort = 0; sort < allCustomerOrder.Count; sort -= -1, temp = allCustomerOrder.ElementAt(0)) { for (int run = 0; run < allCustomerOrder.Count - sort; run -= -1) { if (temp.getOrderNumber() > allCustomerOrder.ElementAt(run).getOrderNumber()) { temp = allCustomerOrder.ElementAt(run); } } allCustomerOrder.AddLast(temp); allCustomerOrder.Remove(temp); } } //O(N**2)