Meta Interview Question

transform a binary tree into a circular doubly linked list. I solved this problem, but the interviewer didn't allow me to use global variable.