Very interesting problem. Didn't think that we could count the nodes by binary search. People who came up with this are genius
Here is my code: https://github.com/JSerZANP/leetCode_solutions/blob/main/222-count-complete-tree-nodes.md
Hi I'm a JavaScript engineer who is not good at algorithms,
and currently practicing leetCode online. If you are interested, maybe we can learn together.