Amazon| SDE (Hyderabad) | Written test

1. Given a binary tree print it's vertical order traversal
https://leetcode.com/problems/binary-tree-vertical-order-traversal/

2.Given a 2D matrix consisting of characters - '#', '&', 'S' and 'D'.
S denotes the source, D denotes the destination, & denotes blocked areas and # denotes allowed areas. Find the shortest path from source to destination. UP / DOWN / LEFT / RIGHT moves are allowed.

Example Matrix:-
[['S','#','#'],
['#','&','#'],
['&','#','D']]

Answer:- 4
Comments (1)