Mastercard Internship OA September 2023
Mastercard · Public Post · Posted Jan 2024
Consider a binary tree of N nodes (1 Root, and N°1 other nodes). Each node is related to the Root by a relation such as L.R. LL, LR and so an,. Given two nodes A and B in a tree, find the shortest path from node A to node B. for example. node 6 to 4 is 6 7 2 5 9 4 2 ...
The full answer & interview discussion are available to premium members.
Log in Create a free account