-
Notifications
You must be signed in to change notification settings - Fork 162
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
challeng7 in python #386
base: master
Are you sure you want to change the base?
challeng7 in python #386
Conversation
print 0 | ||
else: | ||
for num in numbers: | ||
if num +1 < tot and num+1 not in numbers: |
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.
'num + 1 not in numbers is O(n), and you put it in the for loop, together it's O(n square) complexity?
|
I am still learning python. :)
…On Fri, Jan 13, 2017 at 12:09 PM, Manuel Meraz ***@***.***> wrote:
@slansford <https://github.com/slansford>
- *Code Correctness*
Your challenge 7 solution needs to be worked on. I think it's just a
misunderstanding of how the statement if i in list works. To confirm
whether something is in a list this statement will iterate through your
list until it finds the number, then check the next number and iterate
through the list again, until the first for loop finishes. In a sense you
have 2 nested for loops each dependent on the length of the input to find
the missing number making this O(N^2). See if you can improve on this
algorithm.
- *Code Style*
- *Code Documentation*
- *Path Structure*
- *Merge Pull Request*
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#386 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AXw4VCsXbk-NREaqykuNytk6eaZ6FZZxks5rRxwtgaJpZM4LhuB6>
.
|
@py2k5 We can help you in the slack chat if you'd like or I can give you some hints here as well on how to improve. I'd also recommend looking at some of the other python solutions for this challenge. |
sure in fact I wll be glad. let me know when we can get into a call.
…On Jan 13, 2017 8:06 PM, "Manuel Meraz" ***@***.***> wrote:
@py2k5 <https://github.com/py2k5> We can help you in the slack chat if
you'd like or I can give you some hints here as well on how to improve. I'd
also recommend looking at some of the other python solutions for this
challenge.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#386 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AXw4VAh06fCu5Wjik5hsxXx3a8mtgMhAks5rR4wFgaJpZM4LhuB6>
.
|
No description provided.