Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Sorting of an array of object

You should implement the Task.sort() method which takes the: Node[] list argument and sort it in ascending order. Nodes should be sorted by theis number field (the node with a smaller number should be the first).
The sorting should keep the initial order of nodes with the same number. It means that if two nodes have the same number they should be in the same order as in the input array.

Pay attention: the method should sort the input array but now return the new one.