help me with a problem anybody?

  • 12 years ago

    Suppose it were only necessary that the elements in an array be in their correct quartiles; that is, the lowest valued 25 percent of the elements are in the first 25 percent of the array elements, the next 25 percent by value in the  in the next 25 percent of the elements and so on. Can anyone suggest an efficient method for accomplishing this partial sorting.

  • 12 years ago
    Isn't this the same as just ordering the array elements lowest to highest, or have I missed the point ? If so, suggest a simple bubble sort but depends on how many elements are in the array. May also be worth consider STL (if your using VS C++) as this provides some good element list handling including sorting routines.
  • 12 years ago
    The first word should read "isn't" - some strange character conversion going on I think !

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debugging is anticipated with distaste, performed with reluctance, and bragged about forever.” - Dan Kaminsky