Community discussion forum

help me with a problem anybody?

  • 1 year 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.

  • 1 year 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.
  • 1 year 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).

We'd love to hear what you think! Submit ideas or give us feedback