Below functions flatten the nested list of integers (List[List[int]]) into a single list and remove duplicates by leaving only the first occurrences. When the total number of elements is N, choose the one that correctly compares the time complexity with respect to N of each function.

f1 = f3 < f2
f1 = f2 < f3
f3 < f1 = f2
f3 < f1 < f2
f1 = f2 = f3

Below functions flatten the nested list of integers ListListint into a single list and remove duplicates by leaving only the first occurrences When the total nu class=

Respuesta :

The time complexities of the functions is (a) f1 = f3 < f2

How to compare the time complexities?

The time complexities of the functions are dependent on the loops and conditional statements in the function.

From the given code, we have the following highlights:

  • Function f1: 2 loops and 1 conditional statement
  • Function f2: 2 loops and 1 conditional statement in the second loop
  • Function f3: 2 loops and 1 conditional statement

Considering the function f2

The conditional statement in the second loop implies that the conditional statement would be executed several times as long as the loop is valid.

This means that:

f2 > f1 and f2 > f3

Functions f1 and f3 have equal loops and conditional statement.

This means that

f1 = f3

So, we have:

f2 > f1 = f3

Rewrite as:

f1 = f3 < f2

Hence, the time complexities of the functions is (a) f1 = f3 < f2

Read more about time complexities at:

https://brainly.com/question/15549566

#SPJ1