Jump to content

Java sort methods

- - - - -

  • Please log in to reply
No replies to this topic

#1
ToMegaTherion

ToMegaTherion

    Newbie

  • Members
  • PipPip
  • 29 posts
Ok I have a challenge for anyone who would like to reply to this and it is probably quite easy for some.

I need to sort two arrays which are dependant on eachother. Essentially sort one index and pass the same index numbers to a second array so

create a dependant class, which has two private arrays set at 30 each
For the main function send two user defined values 'a' array1 'b' for array2, The two values are dependant on eachother, sort arrayb, so it is in decending numerical order, make arraya dependant on b by employing any index changes in a as in b. Im working on this now it is part of an assignment that is due in a day,

Anyway all of this is fairly well defined, But i need a sort method for the array essentially I am going to use a bubble sort type of method, since the parameters of the assignment specify that preset sort classes are not allowed. Otherwise this would be a sinch. Anyway give it a go if you enjoy a challenge or are trying to learn how to code in Java, and reply in at least another 24hour giving me enough time to have completed and submitted my work.

I have primarily placed this challenge for you guys as a way of seeing some of the sort method people come up with for my own curiosity, I assure you this is not for cheating purposes. Sunday morning and after post your code if you would like the challenge.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users