+ Reply to Thread
Results 1 to 2 of 2

Thread: Sort an Array

  1. #1
    TopGun Guest

    Sort an Array

    There is an array of size N, randomly filled with 0, 1 and 2. How you can sort it efficiently, preferably O(n).

  2. #2
    jalajb2k7 Guest
    i'll use counting sort...as this array is filled with only 0 1 and 2 .. so space will be constant

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Counting Sort
    By Surfer in forum Algorithm/Data Structure Questions
    Replies: 1
    Last Post: 23rd March 2010, 12:49
  2. Radix Sort variation
    By TopGun in forum Algorithm/Data Structure Questions
    Replies: 0
    Last Post: 29th May 2008, 15:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts