MIT 6.00 Intro Computer Science (OCW) 47 Online
OpenStudy (anonymous):

okay, this should be pretty quick, what did ya'll get for the first few questions on the problem set 7 review?

OpenStudy (anonymous):

I got the first two as being linear O(i), number 3 was quadratic: O(s^2), and 4 was also quadratic O(s1^3 * s2^3) or if s1=s2, O(s^6)

OpenStudy (anonymous):

1.) Linear or O(n) because the recursion counts down 1 at a time 2.) Linear or O(n) because the while loop decrements by 1 each time. 3.) Linear because the for statement goes through exhaustive enumeration once. 4.) same as 4. O(n)

OpenStudy (anonymous):

edit: 4.) same as 3 (my bad)

OpenStudy (anonymous):

Wait really? 3 and 4 are linear? I thought that since (3) had nested functions (searching through the entire list 'res' for each element of the list 's'), that it would be quadratic. And since the complexity of (3) had to be taken into account when finding the complexity for (4), I thought that (4) definitely had to be quadratic.

OpenStudy (anonymous):

yes because problem 3 and 4 rely on the amount of n times and that is the maximum times we have to search for the solution. I could be wrong but i dont think so considering 7 out of the 8 people at http://curiousreef.com/class/mit-opencourseware-600-introduction/ have the same answer as me... The other person put linear, linear, linear, and exponential for #4

Latest Questions
Gucchi: english HELP
3 minutes ago 4 Replies 0 Medals
REYSHAWN23134: Hello guys. How are you all
2 hours ago 0 Replies 0 Medals
Gucchi: ````````````` english help
7 minutes ago 7 Replies 1 Medal
Gucchi: english help `
3 hours ago 11 Replies 1 Medal
Gucchi: english help
4 hours ago 16 Replies 3 Medals
luhivqqcherry: guys so what will happen if I don't get my iron up fast enough ? .
4 hours ago 15 Replies 2 Medals
luhivqqcherry: how do I fix low iron ?
4 hours ago 64 Replies 0 Medals