Minakshi S.

asked • 05/23/16

Complexity classes in Python

In python for complexity classes,
 
If we return a tuple like (v,k+1), is that return statement a complexity class of O(N) because of tuple containment? 
 
The function is like this:
 
def sum(dicty):
    for k,v in dicty.items():
        return (v,k+1)

1 Expert Answer

By:

Cole Z. answered • 06/10/17

Tutor
New to Wyzant

Cole, a student of Artificial Intelligence at U Edinburgh

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.