We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Swift is in fact broken. The boilerplate provided is causing issue even with correct code in the getHeight() function. The boilerplate provided is force-unwrapping data in an unsafe way causing the issue to occur during the construction of the tree - even before our user controlled code can execute. Leetcode never has this issue.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Height of a Binary Tree
You are viewing a single comment's thread. Return to all comments →
Swift is in fact broken. The boilerplate provided is causing issue even with correct code in the getHeight() function. The boilerplate provided is force-unwrapping data in an unsafe way causing the issue to occur during the construction of the tree - even before our user controlled code can execute. Leetcode never has this issue.