TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

OpenTable Daily Algorithm Challenge

5 pointsby jmsuthover 8 years ago

1 comment

doesnotexistover 8 years ago
I&#x27;m not sure if this is intentional or not but the &quot;official&quot; solution to today&#x27;s challenge appears to have a bug.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;opentable&#x2F;ot-daily-algorithm&#x2F;commit&#x2F;e811a1c2d500df90148164806411af76fa52c179#diff-9bd97815e9a3b60534ac901d300b3dcb" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;opentable&#x2F;ot-daily-algorithm&#x2F;commit&#x2F;e811a...</a><p>It will return true even when the tree is not a valid BST. Consider the case where a leaf in the left subtree contains a value higher than the root of the tree.
评论 #13583970 未加载