Is there a function that takes 1,2,3 and returns 3,1,2 respectively and vice-verse. eg: f(1)=3 f(2)=1 f(3)=2
This is required to get the cyclic order eg 1 when gone left will be 3 , 2 will be 1 and 3 will be 2. 1 when gone right will be 2 , 2 will be 3 and 3 will be 1.