Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please I have only 20 min 1: Please choose the best answer from four choices A), B), C) and D) to the questions. (16 pts)

image text in transcribed

please I have only 20 min

1: Please choose the best answer from four choices A), B), C) and D) to the questions. (16 pts) The two main sspects of algorithm analysis are (A) (A)Space complexity and time complexity (B) Readability and documentation (C) Correctness and conciscness (D) Data complexity and program complexity 1) Analyze the time complexity of the following code (A) for(i=1;i) 1 y=y+1;for(j=0;3(2n)j++)x++; (A) O(n2) (B) O(n) (C) O(log2n) (D) O(n!) 3)The average time complexity of the quick sort algorithm is (A) O(1) (B) O(logn) (C) O(n2) (D) O(nlogn) 4) The following stable sorting algorithms are (A) Selection sort (B) Insertion sort (C) Heap sort (D) Quick sort 5) A directed complete graph with n vertices has _ edges. (A)n(n-1)2 (B) n(n1) (C)n(n+1)/2 (D) n(n+1) 6) Depth first traversal is similar to the of a binary tree. (A)Preorder traversal (B) Inorder traversal (C)Postorder (D)Hicrarchieal traversal traversal

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions