| ??? 02/14/04 08:30 Read: times |
#64791 - RE: What about PI? Responding to: ???'s previous message |
The answer was to use a linear sort where you have a straight line between your minimum and maximum values and you simply place a mark at each point on the line where there is a value to be sorted.So in terms of a sort routine you have as has been said an array and for each value to be sorted you make an entry in that array.To find the maximum value you simply look for the last entry,minimum the first.
Two problems,first if you have a list of unsigned integers to sort then your array might have to have 65535 entries,and secondly if you have multiple entries of the same value then you need a two dimentional array to store the number of times that entry occures. |
| Topic | Author | Date |
| This weeks puzzle:-) | 01/01/70 00:00 | |
| RE: This weeks puzzle:-) | 01/01/70 00:00 | |
| RE: This weeks puzzle:-) | 01/01/70 00:00 | |
| RE: This weeks puzzle:-) | 01/01/70 00:00 | |
| RE: This weeks puzzle:-) | 01/01/70 00:00 | |
| RE: This weeks puzzle:-) | 01/01/70 00:00 | |
| RE: This weeks puzzle:-) | 01/01/70 00:00 | |
| RE: This weeks puzzle:-) | 01/01/70 00:00 | |
| What about PI? | 01/01/70 00:00 | |
| RE: What about PI? | 01/01/70 00:00 | |
| RE: What about PI? | 01/01/70 00:00 | |
| Compare - Jez | 01/01/70 00:00 | |
| RE: Compare - Jez | 01/01/70 00:00 | |
| RE: Compare - Jez | 01/01/70 00:00 | |
RE: Compare - Jez | 01/01/70 00:00 |



