Why does the solution have this additional check:
if (i == levelSize - 1) result.add(currentNode);
Every time the for loop ends, the “current” TreeNode, I believe will have the rightmost value
So once the for loops ends, without any check, we can just do result.add(current);