Algorithm for sorting a deck of cards, Data Structure & Algorithms

What is wrong with the following algorithm for sorting a deck of cards (considering the basic properties of algorithms)?

I. Put the cards together into a pile

II. For each card in the pile:

- Turn it face up

III. Sort the cards

Posted Date: 3/20/2013 2:05:08 AM | Location : United States







Related Discussions:- Algorithm for sorting a deck of cards, Assignment Help, Ask Question on Algorithm for sorting a deck of cards, Get Answer, Expert's Help, Algorithm for sorting a deck of cards Discussions

Write discussion on Algorithm for sorting a deck of cards
Your posts are moderated
Related Questions
In the book the following methods are presented: static void selectionSort(Comparable[] list) static void insertionSort(Comparable[] list) static boolean linearSearch(Comparable

what are the charaterstics to determine weather an algorithm is good or not? explain in detail

what is circular doubly link list?write down the algorithm for insertion of elements in circular doubly link list

what do we use asymptotic notation in study of algorithm?Describe various asymptotic notation and give their significance.

Red-Black trees have introduced a new property in the binary search tree that means an extra property of color (red, black). However, as these trees grow, in their operations such

Define Merge Sort  Merge sort is a perfect example of a successful application of the divide and conquer method. It sorts a given array A[0...n-l] by separating it into two ha

Explain about the Structured types - Built-In Types Values of the carrier set are not atomic, consisting rather than several atomic values arranged in some way. Common illu

B i n a ry Search Algorithm is given as follows 1. if (low > high) 2.     return (-1) 3. mid = (low +high)/2; 4. if ( X = = a [mid]) 5.      return (mid); 6.

write aprogram for random -search to implement if a[i]=x;then terminate other wise continue the search by picking new randon inex into a

Ans. An algorithm for the quick sort is as follows: void quicksort ( int a[ ], int lower, int upper ) { int i ; if ( upper > lower ) { i = split ( a, lower, up