The example of binary search seems off. Why would you arbitrarily dump [a] or [b] just because x does not equal the mid point? Wouldn't you instead check if the mid point is greater or less than x and then continue accordingly?
@JohnBastardSnow10 жыл бұрын
He put either wrong or over-simplified example of the binary search. Usually it goes like you've said: if number > current_num_in_array: #jump middle left else if number < current_num_in_array: #jump middle right else: return current_num_in_array As you can see you will never actually have to compare if it equals ( == ) . If it's not greater or less, then it's obviously the result.
@JustinAbrahms10 жыл бұрын
Hi Jon Wise . Thanks for correcting this. It was, in fact, an oversimplification. In words, I allude to using greater than / less than, but show equals.
@diek0010 жыл бұрын
Justin, are you going to post the powerpoint presentation? I am in the same boat as you, kinda. I first encountered Big O notation when I took an MIT course on python. And unfortunately they did not do the topic justice. I guess measuring complexity is common place for computer science classes, but not 2 year IT programs.
@JustinAbrahms10 жыл бұрын
Hey Diek Kearney . The slides are at speakerdeck.com/pycon2014/computer-science-fundamentals-for-self-taught-programmers-by-justin-abrahms if you'd still like to see them. :)
@diek0010 жыл бұрын
Justin, thank you I appreciate it. I frequently mention your video in the python fb groups I belong to.
@JustinAbrahms10 жыл бұрын
Diek Kearney Feel free to mention me directly, and I'm happy to answer questions.
@diek0010 жыл бұрын
I admin 4 FB groups, 1 a beginner python course from the UoM, 2 python groups, and a django group. In the range of 20000+ people combined and your Big O video gets lots mentions, with your name.
@bowenliu8074 жыл бұрын
@@JustinAbrahms Hey Justin, thanks for your presentation. Could you elaborate on the part of your presentation where you concluded that 5x+9 is also O(n). Your explanation is based on how the lines will never touch. 5x + 9 won't touch kx, with k being a random number. How can that be good supporting evidence for 5x+9 to be O(n)? Thanks
@pascalfragnoud28465 жыл бұрын
I think this talk is missing something that would make everything much clearer, particularly the part where we ignore the "lesser" parts of the complexity: big O is about growth. This is why O(n) * O(1) in the exemple is simply O(n), O(1) doesn't change the growth rate of an algorithm's complexity. Visually, if you plot it, the line would simply move up a bit, its shape wouldn't change.
@Noturbusiness9110 жыл бұрын
the "uhh" and "umm" every nano second 0.o
@MrBeiragua9 жыл бұрын
for i in range(0,1000000): print("Uhmmmmm")
@LiamWhan9 жыл бұрын
+Mosco Monster If I'm not mistaken, this is the source of the WinME Kernel in its entirety