The solution for Challenge 1 is wrong. A perfectly balanced tree will always be an odd number.
The return statement should change to
Int(pow(2.0, Double(height))) - 1
The solution for Challenge 1 is wrong. A perfectly balanced tree will always be an odd number.
The return statement should change to
Int(pow(2.0, Double(height))) - 1