JAVA || easy to understand BFS  || Queue
Performing BFS on trees is also known as level-order traversal, easy to understand code below: \n```\n/*\n * Definition for a binary tree node.\n * public class
Performing BFS on trees is also known as level-order traversal, easy to understand code below: \n```\n/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNode right;\n *     TreeNode() {}\n *     TreeNode(int val) { this.val = val; }\n *     TreeNode(int val, TreeNode left, TreeNode right) {\n *         this.val = val;\n *         this.left = left;\n *         this.right = right;\n *     }\n * }\n */\n\n//\nclass Solution {\n    public int maxLevelSum(TreeNode root) {\n        int level = 0;\n        int maxSum = Integer.MIN_VALUE;\n        int maxSumLevel = 0;\n        \n        Queue<TreeNode> bfs = new LinkedList<>();\n        \n        bfs.add(root);\n        \n        while(!bfs.isEmpty()){\n            int size = bfs.size();\n            int levelSum = 0;\n            while(size-- > 0 ){\n                \n                TreeNode curr = bfs.poll();\n                levelSum += curr.val;\n                \n                if(curr.left != null) bfs.add(curr.left);\n                if(curr.right != null) bfs.add(curr.right);\n                \n            }\n            \n            level++;\n            \n            if(levelSum > maxSum){\n                maxSum = levelSum;\n                maxSumLevel = level;\n            }\n        }\n        \n        return maxSumLevel;\n    }\n}
['Breadth-First Search', 'Queue', 'Java']