Exercise 1 In: def f1 ( lst ): r = 0 n = 100 if len ( lst ) < n: n = len(lst) for x in range ( n ): r + = x Read Only Hypothesis:f1= O(?
Question

# Exercise 1<br/>In :<br/><br/><br/><br/><br/><br/><br/>def f1(lst):

r = 0 n = 100 if len(lst) &lt; n: n = len(lst) for x in range(n): r += x Read Only
Hypothesis: f1 = O(?) ← fill in your hypothesis here
In :

# collect timing data into arrays/lists here ns = [] ts = [] Graded

Starter Code
In [ ]:

# plot your data and bounding functions here plt.plot(ns, ts, 'or') plt.plot(ns, [], '-g') plt.plot(ns, [], '-b'); Graded

Starter Code
Exercise 2
In [ ]:

def f2(x): r = x / 2 d = 1e-10 while abs(x - r**2) &gt; d: r = (r + x/r) / 2 return r Read Only
Hypothesis: f2 = O(?) ← fill in your hypothesis here
In [ ]:

# collect timing data into arrays/lists here ns = [] ts = [] Graded

Starter Code
In [ ]:

# plot your data and bounding functions here plt.plot(ns, ts, 'or') plt.plot(ns, [], '-g') plt.plot(ns, [], '-b');

Exercise 2 ONLY!!!

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents
• ### - 