An algorithm take 2 ms input size n = 100 How large a problem can be solved in 1
ID: 3624476 • Letter: A
Question
An algorithm take 2 ms input size n = 100 How large a problem can be solved in 10 min if the running time is the following (assume low order terms are )? Theta (N) Theta (N log2 N) Theta (N3) (1+1=2 ) consider the following program segment How many times the inner kop body iterates ? what's the growth rate of the run time function of this segment How many times the inner kop body iterates ? what's the growth rate of the run time function of this segment (3+3+3+3=12) consider the array 1,-9,89,25,0,5,99,-4 Show the programs and the array after path when the following algorithm are performed on this array selection sort Bubble Sort Insertion sort Merge SortExplanation / Answer
4) (a) Given segment, three operations are carried out each time the k loop is executed . 1.The k loop runs for j times, 2. j loop runs for i times and 3. i loop runs N times Running time of this function is O(N3). (b) Here given segment code, two operations are carried out time the j loop is executed.The j loops runs for i times and i loop runs n times.therefore the running time of this function is O(N2). Note:Post remaining Questions on another post. Note:Post remaining Questions on another post.Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.