-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Code solutions differ from video. #424
Comments
I'm not sure how much it matters in this case, but it could definitely be confusing for some of the harder problems. |
Java and Typescript solutions are algorithmically the same to Python's. They calculate the sum of range [0, n] before iteration, as opposed to during iteration (as with Python's case). Additionally, https://neetcode.io/ groups |
Sorry, I should have chosen a better example. I'll edit my initial comment when I find one, but I wanted to raise the issue of how code is translated between the python solution and other languages to avoid confusion and refactors later on. |
It seems some solutions differ from the video, for
268-Missing-Number
this code is shown in the video and appears as the python solution on neetcode.io:However the Java, C++ and proposed Typescript solution (#422) use slightly different algorithms:
Java:
C++:
Typescript:
The text was updated successfully, but these errors were encountered: