Lec 10 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lecture 10: Divide and conquer methods, merge sort, exceptions
Instructors: Prof. Eric Grimson, Prof. John Guttag
View the complete course at: ocw.mit.edu/6-00F08
License: Creative Commons BY-NC-SA
More information at ocw.mit.edu/terms
More courses at ocw.mit.edu
Пікірлер: 39
These videos make programming far more interesting and easy to understand than anything else I've tried to learn from. Thank you, MIT.
17:09 to elaborate on the complexity of each level, the bottom level merging the singleton lists has N/2 steps, it keeps getting larger until the final level with N-1 steps merging the final 2 sorted lists.
This is solid beginning to students majoring in computer science.
Such an incredible professor
@jerricogomez its not a space error..its the indentation of subsequent blocks of code that python forces u to use...to get used to it use good text editors as VIM etc..and google around about vim's python feature...
Great intro into some basic algorithms in CS. My first course in programming sucked in comparison; we didn't learn anything beyond bubble sort and not even binary search.
this course is great!
very helpful lecture.
thank you guys this lecture was great
KZread's interactive transcript seems to miss on context a little easier than you'd think. for instance, at 30:01 the transcript says "root force..." and the professor had actually said "root force". It also seems to have trouble with one my favorite KZreadr's voice. LOTS of syntax errors in THAT transcript.
awesome course and taught in a very way, thanks
that is very great
I have a question. Professor Grimson said, that the exception raised inside the 'getGrades' function wasn't an IOError, but in fact it was an IOError, wasn't it? Because otherwise It wouldn't t raise the error tot the 'try' call. Furthermore, the " 'Could not open', fname " message would only be printed if it got inside of the except clause, which would only happen if the error was specifically an IOError, right? I got a bit confused at this part. Tks
@jenkinsj9224
3 жыл бұрын
Yes, you are totally correct. It was an IOError to begin with.
Anyone knows where I can find that handout?
1) because of the speed... When I do a simple copy paste in linux I have 31Mb/s... When I do it in windows only 8-9Mb/s... Which one is better? :) 2) you don't have to pay for it, and everything works without drivers (you need to install video drivers for 3D aplications - it does that for you with a click) 3) no viruses 4) you want to play, pay for software use windows / you want speed and not pay every year for antivirus and software use linux :)
@kopilatis10 try checking the OCW website - you might get lucky by findng the prinout there.
and environment
Is there anybody who could help me. I have written all the codes i.e def merge() and def mergesort(). But when i run it with test the output gets stuck with merge. I mean it divides but in merge it gives me error says typeerror 'none type'. Cd you please tell me what is the code for list test and def mergesort(test). thank you all
@pulprobot5120
10 жыл бұрын
ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/video-lectures/lecture-10/lec10.pdf Here are all the lines of code for this lecture, hope this helps.
@speensaba262
10 жыл бұрын
thanks u very much sir.
windows rocks. macs and linux are very good for programmers because of the interface
why is everybody using macs and linux?
👍👍👍👍👍👍👍👍👍
I could not get this to work. I get the following error. >>> [1, 4, 3, 6, 5, 2, 8, 7] [1, 4, 3, 6] [1, 4] [1] [4] merged [1] [3, 6] [3] [6] merged [3] merged [1] [5, 2, 8, 7] [5, 2] [5] [2] Traceback (most recent call last): File "C:\Python27\mergesort.py", line 36, in mergesort(test) File "C:\Python27\mergesort.py", line 30, in mergesort right = mergesort(L[middle:]) File "C:\Python27\mergesort.py", line 29, in mergesort left = mergesort(L[:middle]) File "C:\Python27\mergesort.py", line 31, in mergesort together = merge(left,right) File "C:\Python27\mergesort.py", line 12, in merge result.append(right[j]) MemoryError Can anybody help?
@sunner008
6 жыл бұрын
could you show me the code?
"been a long day".
When I try to do the insert function after I do the create function I get a type error: TypeError: object doesn't support item assignment Can someone please explain what is going wrong?
@sepantagh6234
5 жыл бұрын
timfoil740 probably you should update your python
@timfoil740
Жыл бұрын
@@sepantagh6234 thanks that worked
👍👍
Macs - coz people have the cash. Linux - cause it's highly-legally-customizable. You can (and are allowed to) practically change each and every damn thing about it (if you want to). Oh and no viruses (in both).
mit course on visual basic.
mit course on ms word ms excel ms powerpoint ms access and oracle.
great if u dont have much money to study in mit but u can attend classes for free
Just watching the whole series from Australia - great lectures. However my classic problem with university was typified at 02:50 - me concentrating hard, hot girl walks by in hot pants, my eyes turn to spirals and I lose concentration for 5 mins. Education should always be on you tube with camera focussed hard in on the lecturer. Its the only way it can be done, certainly for me anyway. Does this constitute a recognised attention deficit disorder I wonder? Sounds flippant but its a real problem