Link: https://leetcode.com/problems/find-largest-value-in-each-tree-row/
Solution:
Intuition
Pretty trivial problem…either DFS or BFS works here. I’ll implement it with a DFS since the implementation is a bit simpler, but at the cost of stack space of course.
Implementation
Review 1
Nice problem, nice solution. Not much to say about this one.