my answer and program https://ide.codingblocks.com/s/158199
is right , but ur platform showing all the test case wrong
please help me with it
Sort game answer coming wrong
pls try to use java Comparable interface which is used to sort a array or list of objects based on the users choice.
the approach used by u may be correct but if the complecations of sorting increased then the it will be difficult to write the code in such manner.
so try to use java comparable interface for sorting.
First time it mostly seems difficult to use but it is very easy when u become use to it.