Compute the next Prüfer code from the given code with wrap-around.
For example, the next code of 1,4 will be 2,1 and the next code of 4,4 will be 1,1.
1,4
2,1
4,4
1,1
Compute the next Prüfer code from the given code with wrap-around.
For example, the next code of
1,4will be2,1and the next code of4,4will be1,1.