8️⃣

# 15.8 Practice

## Practice

### Practice 1

Label the running time of each line (use comment) of the template code in Big-O in terms of the input, and at the end (use comment) put the running time of the whole program in Big-O in terms of the input. The input of the problem is `ex_list`, and assume it has n elements. The first two lines will be done for you as an example.

### Practice 2

Label the running time of each line(use comment) of the following code in Big-O in terms of the input, and at the end(use comment) put the running time of the whole program in Big-O in terms of the input. The input of the problem is `ex_list`, and assume it has n elements. The first two lines will be done for you as an example. Hint: Tricky case.

### Practice 3

Label the running time of each line(use comment) of the following code in Big-O in terms of the input, and at the end(use comment) put the running time of the whole program in Big-O in terms of the input. The input of the problem is `ex_list`, and assume it has n elements. The first two lines will be done for you as an example.

### Practice 4

Label the running time of each line(use comment) of the following code in Big-O in terms of the input, and at the end(use comment) put the running time of the whole program in Big-O in terms of the input. The input of the problem is `ex_list`, and assume it has n elements. The first two lines will be done for you as an example. Note: You will be surprised!

### Practice 5

Label the running time of each line(use comment) of the following code in Big-O in terms of the input, and at the end(use comment) put the running time of the whole program in Big-O in terms of the input. The input of the problem is `ex_list`, and assume it has n elements. The first two lines will be done for you as an example. This problem assumes you have knowledge of 2D Lists.

## Previous Section

7️⃣
15.7 Tricky Cases

⚖️