Validate complete binary tree | Meta Interview Question