java - Implementing Pseudo-Code for Multikey Sort -


the idea sort list of objects each hold 2 key values.

the pseudocode preform such algorithm given me so:

to sort list of objects more 1 key     each key position p, least significant significant key         establish 1 queue each of key values         each object o in list,              place o in queue corresponding key or o in position p         end    end  end 

i not know how translates code, i'm having hard time understanding psuedo code. lets have this:

class main(){ sorter.build(); sorter.sort(); }   class sorter(){ public static arraylist<lyrics> deck = new arraylist<>();  public void build(){ //add.card objects arraylist deck }  public void sort(){ // how begin sort? }   class card(){ public string suite; public string rank; public card(string s, string r){ suite = s; rank = r; } 


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

xcode - Swift Playground - Files are not readable -

jboss7.x - JBoss AS 7.3 vs 7.4 and differences -