You dont need to read input. Complete the function printCorner() which takes root node as input parameter and prints the corner nodes separated by spaces. The left corner should be printed before the right for each level starting from level 0. Note: Don't print a new line after printing all the corner nodes.
Expected Time Complexity: O(N) Expected Auxiliary Space: O(number of nodes in a level)