logo

Crowdly

Browser

Add to Chrome

Sea la siguiente función  f , indica cuál es su orden de complejidad asintótica:...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Sea la siguiente función f, indica cuál es su orden de complejidad asintótica: 

def f(lista: List[int]) -> (int, int): 

    if lista == [] or lista[0] % 2 != 0: 

        return 0, 0 

    else: 

        i: int 

        suma: int = 0 

        for i in lista: 

            suma += i 

        producto: int = 0 

        for i in lista: 

            producto *= i 

        return suma, producto 

❌
❌
❌
✅
❌
More questions like this

Want instant access to all verified answers on moodle.upm.es?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome