I\'m doing an assignment and need to write a Quick Sort function to sort a (n x 3) matrix according to a certain key.
Say for example the user inputs the key [2,0,1].