← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Given the root of a binary tree, return two lists: the left-side view and the right-side view of the tree. The left-side view is the sequence of nodes visible when the tree is viewed from its left side (the first node at every level from top to bottom). The right-side view is the sequence of nodes visible when the tree is viewed from its right side (the last node at every level from top to bottom). Both lists should be returned in top-to-bottom order of the levels they represent.