Tripadvisor Interview Question

Given a complete binary tree, write a program to link each node in a level to its right sibling.