I have two list, one reference and one input list
Ref = [3, 2, 1, 12, 11, 10, 9, 8, 7, 6, 5, 4]
Input = [9, 5, 2, 3, 10, 4, 11, 8]
I want to sort Input list, in the order as that of Ref. If some element is missing in Input list, it can skip and go for the other element.
Hence sorted Input list, based on Ref list will be like this
Sorted_Input = [3, 2, 11, 10, 9, 8, 5, 4]