What is the big-O cost function of this algorithm?

Posted by ??iu on Stack Overflow See other posts from Stack Overflow or by ??iu
Published on 2010-05-05T14:39:36Z Indexed on 2010/05/05 14:48 UTC
Read the original article Hit count: 206

Filed under:
|
|

How would you characterize the below in big-O notation?

rotors = [1,2,3,4,5 ...]
widgets = ['a', 'b', 'c', 'd', 'e' ...]

assert len(rotors) == len(widgets)

for r in rotors:
    for w in widgets:
        ...

    del w[0]

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about big-o