The Artima Developer Community
Sponsored Link

Java Answers Forum
Please help me with a Java Radix Sorter

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Melissa

Posts: 1
Nickname: mel
Registered: May, 2002

Please help me with a Java Radix Sorter Posted: May 10, 2002 4:43 AM
Reply to this message Reply
Advertisement
Please help. I am quite new to java, and am currently working on a Radix Sorter using Queues. At the moment my Radix Sorter uses a radix of 10. To extract the first digit, it divides the integer by 10, and takes the remainder. To extract the second digit it divides the integer by 100, takes the remainder and then divides that by 10, and so on... But I now have to modify the Radix Sorter to use a radix of 2, which means that division will be done by a power of 2. This apparently can be done using bit shift operators. I am not sure how i can extract the necesarry digits using a radix of 2.

Any ideas?

Topic: websphere 2 & java 1.1.8 Previous Topic   Next Topic Topic: array

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use