![]() |
|
#1
|
|||
|
|||
bucket sort problemi needed to write a function that takes an integer array and the array size as arguments and performs as follows:
a)place each value of the single-subscripted array into a row of the bucket array based on the value's ones digit.for exemple 97 is placed in row 7,3 is placed in row 3 and 100 is placed in row 0. b)loop through the bucket array row by row,and copy the values back to the original array. c)repeat the process for each subsequentdigit position( tens,hundreds,thousands...) i have been given that as a starter in c ++ programming and even though my template was correct,i feel it is not the most efficient way. |
|
#2
|
|||
|
|||
eurekai figured it out.and i thought that i should post it in case someone needs it in the future.
CPP / C++ / C Code:
|
|
#3
|
|||
|
|||
Ok this is what I have so far but I keep getting errors.I keep trying different ways to get this bucket sort but I don't have much to go on because their is nothing on bucket sorts in my book. I have used search engines to try to find out about them. They show me some code about them but nothing on how they work in arrays. I am just getting more confused.
CPP / C++ / C Code:
|
|
#4
|
||||
|
||||
|
How many different threads do we have to heep track of for this problem? Stick to one thread! You know it's your when your name is under the title.
__________________
Age is unimportant -- except in cheese |
Recent GIDBlog
Developing GUIs with wxPython (Part 4) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Merge sort on a linked list | Temujin_12 | C++ Forum | 1 | 06-Mar-2008 20:33 |
| [GIM] gim.h | dsmith | C Programming Language | 0 | 18-Jan-2005 08:48 |
| Another FX 5600 problem (but with details that might shed light on this) | BobDaDuck | Computer Hardware Forum | 2 | 16-Apr-2004 07:53 |
| problem with php5 cgi installation | fab13 | Apache Web Server Forum | 3 | 19-Nov-2003 09:11 |
| join problem | zuzupus | MySQL / PHP Forum | 0 | 14-Aug-2003 05:11 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The