Right side view of binary tree

Hye folks! did everthing i could but stilll could not solve this for all testcases . Please see and help me out.https://ide.codingblocks.com/s/476783