I got another question suppose I have list of case types. I want to rearrange the items in the Arraylist, Here are the rules:
C1 is processed first
But the current order stored in the list is as follows: A1, B1, C1, D1.
Output prints [C1, A1, B1, D1] as desired. Is there a better way than this using Hasp Map instead of this recursive thing.