6. Tower of Hanoi with Adjacency Requirement: (each 2 points) Suppose that in addition to the requirement that they never move a larger disk on top of a smaller one, the priests who move the disks of the Tower of Hanoi are also
allowed only to move disks one by one from one pole to an adjacent pole.
Assume poles A and C are at the two ends of the row and pole B is in the middle, if a single disk is to be moved from pole A to pole C (using pole B), then moving the disk directly from A to C is not allowed. The disk must be first transferred to pole B and then to pole C.(A->B,B->C)
The following function shows the solution for Tower of Hanoi with Adjacency Requirement. Please fill the blanks, and derive the time complexity of the program.
/* note: move n disks from pole "from" to pole "to" using pole "aux" for auxiliary, where pole "from" is not adjacent to pole "to". */
void HanoiWithAdj(char from, char aux, char to, int n){