Source Code:https://thecodingsimplified.com/find-maximum-or-minimum-in-binary-tree/
Solution:
- We'll solve this in preorder manner & at each step, check if current value is greater than maximum then update the max value & current value is less than minimum value then update the minimum value.
- Time Complexity: O(n)
- Space Complexity: O(1)
Do Watch video for more info
This Problem is synonym of following problems:
binary tree find maximum value
binary tree find minimum value
Find minimum value in binary tree,
Find maximum value in binary tree,
coding simplified
CHECK OUT CODING SIMPLIFIED
https://www.youtube.com/codingsimplified
★☆★ VIEW THE BLOG POST: ★☆★
http://thecodingsimplified.com
I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 200+ videos.
★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★
https://www.youtube.com/codingsimplified?sub_confirmation=1
★☆★ Send us mail at: ★☆★
Email: [email protected]