• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Radix Sort

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am down to the end of the semester and running out of time for a lot of things. One last assignment I have to do for my java class is modify a prewritten radix sort for integers so that it will radix sort strings instead. I really am at quite a loss on what to do here and it isn't terribly important that I actually learn much from this assignment as we are already at the end of the class and we will not be tested on the content covered in this assignment. Is there anyone that would mind taking a look at the code provided and helping me out? I would rather not post all of the code here for obvious reasons. Thanks for your time.
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

It's worth noting that this site is about learning, not about passing classes. People won't do your work for you. If you want help, post the relevant code, or an SSCCE equivalent, and ask a specific question.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

george harvin wrote:One last assignment I have to do for my java class is modify a prewritten radix sort for integers so that it will radix sort strings instead. I really am at quite a loss on what to do here and it isn't terribly important that I actually learn much from this assignment as we are already at the end of the class and we will not be tested on the content covered in this assignment. Is there anyone that would mind taking a look at the code provided and helping me out? I would rather not post all of the code here for obvious reasons. Thanks for your time.


As Jeff said.

I will, however, offer this advice: If the original radix sort was sorting based on 'digits' (ie, base 10), then a String radix sort is likely to be based around characters (ie, base 65536). If your code basically does that, chances are it's probably right. Furthermore, the business of extracting a 'digit' is already provided for you.

Remember: in Java, a char is a numeric type.

Winston
 
reply
    Bookmark Topic Watch Topic
  • New Topic