This is a popular question asked at Facebook. The idea is to use a BFS and keep track of your sum as you iterate over each level.
Check out my interview prep platform for learning the patterns!
📢 Interview Prep Platform: https://algoswithmichael.com
🎧 Join the community Discord: https://discord.gg/aVWsAaaCtT
💰 Support me on Patreon: https://www.patreon.com/michaelmuinos
🔗Follow me on LinkedIn: https://www.linkedin.com/in/michael-muinos
📂Follow me on Github: https://github.com/MichaelMuinos
Download
0 formats
No download links available.
Facebook Coding Interview Question - Average of Levels in Binary Tree | NatokHD