OA was given during the evening slot at around 5 PM for a duration of 90 minutes. The platform was cocubes .
Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
You have been given a non-empty grid consisting of only 0s and 1s. You have to find the number of islands in the given grid.An island is a group of 1s (representing land) connected horizontally, vertically, or diagonally. You can assume that all four edges of the grid are surrounded by 0s (representing water).