Question: do question 5 1. Solve the tollowing time complexity problems. a) Show that: 3x3+x2logx+2x2+3logxO(x3) b) Show that: 2x2+(logx)2+logx+8(x2) (Average time complexity) 2. Write a pseudo
1. Solve the tollowing time complexity problems. a) Show that: 3x3+x2logx+2x2+3logxO(x3) b) Show that: 2x2+(logx)2+logx+8(x2) (Average time complexity) 2. Write a pseudo code for finding two smallest numbers in a list of positive integers. Trace your code for a small list with at least 4 integers. 3. Find the worst-case time complexity (big-O) for the following codes: a) fori=1ton1forj2i+1to2n1comparisonoperation b) \begin{tabular}{l} for i=1 to n1 \\ for j=1 to m+1 \\ for k=1 to t \\ comp operation \\ for l=1 to n \\ multiplication operation \\ \hline \end{tabular} 4. Write a pseudocode for the following: a) An algorithm that takes n integers and defines if number of negative integers is larger than positive integers in the list. b) A recursive code for exponentiation: ab 5. Find GCD(323,124). Also, find " s " and " t " s. t. GSD(323,124)=s323+t124 (2nd part has bonus mark)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
