New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JavaScript for linear search #157
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank @JoseHung for the addition and the fixing! There are several comments to be addressed.
@@ -337,7 +369,8 @@ $$ | |||
=== "JavaScript" | |||
|
|||
```js title="" | |||
|
|||
// JavaScript 中的数字足够大(最大数值为 1.7976931348623157e+308 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, 1.7976931348623157e+308 is not infinite, so we still have to handle the big-number problem. I'll update the code. @JoseHung
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahaha. Actually I think both of the explanations are reasonable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, apparently we won't reach 1.7976931348623157e+308 in most cases. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update! Now merge it.
Checklist
I also fixed a error of making assignment to the constant variable in the ListNode.js.