1. Consider the following algorithm: Input: list a consisting N elements for i from 0 to len(a) gencrate a random number x if a[i]

Can u solve it using functions and please solve part 2 and 3 also, not only part 1.1. Consider the following algorithm:<br>Input: list a consisting N elements<br>for i from 0 to len(a)<br>gencrate a random number x<br>if a[i]<x<br>display a[i] is greater than x<br>else<br>for j from 1 to 10<br>display j*100<br>a. Convert the pseudocode into a Python program that can work with any list. Try with a list<br>consisting of 20 elements.<br>Determine the time complexity of dhis algorithun via<br>b. calculating T(N) and converting into big O notation,<br>c. direct calculation with big O notation.<br>2. Consider the following lists<br>a=[

Extracted text: 1. Consider the following algorithm: Input: list a consisting N elements for i from 0 to len(a) gencrate a random number x if a[i]
Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here