[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Counting sort VS radix sort

Posted on 2007-10-18
4
Medium Priority
?
2,163 Views
Last Modified: 2008-01-09
I'm trying to sort an array of words  by counting sort ans radix sort
array[0] = "google" ;
array[1] = "yahoo" ;
.
.
.
.
array[n] = "test" ;
using this java signature


public Sort {

   /**
    * Sort the given array using counting sort. The lexicographic ordering
    * of the strings should be used. (the order in which the letters are in
    * the ascii table)
    *
    * @param list
    *                the array to be sorted
    * @param index
    *                the index of the character to sort on
    * @return the array sorted on the index'th character.
    */
   String[] countingSort(String[] list, int index)
   {
      // code here
   }

   /**
    * Sort the given array using radix sort.
    *
    * @param list
    * the array to be sorted
    */
   String[] sort(String[] li)
     {
        //code here  
     }
}


any one have idea how to solve ??
0
Comment
Question by:EssamHaroon
  • 2
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 1000 total points
ID: 20106903
0
 

Author Comment

by:EssamHaroon
ID: 20113381
thanks chej but this site is not exactly what I'm looking for
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 20114121
>>thanks chej but this site is not exactly what I'm looking for

In what way?
0
 

Author Comment

by:EssamHaroon
ID: 20115449
the sort code in the site you gave based on linked list not array
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month18 days, 15 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question