Grab | Online Assessment
Anonymous User
1691

3 Questions | 3 hour

Q1 - https://leetcode.com/problems/bulb-switcher-iii/
Q2 - Given Binary tree, return the number of nodes on the longest distinct path that starts at the root.
Q3- Given n edges of a directed graph and there are n nodes (0..n). return the node, which is reachable from every node of the graph. If such node doesn't exist , return -1.


I was able to do first 2 questions, for Q3 only some of the test cases passed.
Any suggestions for Q3?

Comments (6)