CSE334_Practice Set2

CSE334_Practice Set2

University

10 Qs

quiz-placeholder

Similar activities

Weekly Contest #6 - TechXNinjas

Weekly Contest #6 - TechXNinjas

University

10 Qs

HEAP

HEAP

University

10 Qs

Complejidad de algoritmos iterativos

Complejidad de algoritmos iterativos

University

10 Qs

Basic Computer Quiz

Basic Computer Quiz

University

11 Qs

Fundamentals of Algorithms - Unit I - Test 2

Fundamentals of Algorithms - Unit I - Test 2

University

10 Qs

Quiz 2 Growth Function

Quiz 2 Growth Function

University

6 Qs

Searching and Sorting

Searching and Sorting

University - Professional Development

15 Qs

Stacks and Queues Quiz

Stacks and Queues Quiz

University

15 Qs

CSE334_Practice Set2

CSE334_Practice Set2

Assessment

Quiz

Computers

University

Hard

Created by

Pushpendra Pateriya

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree?

20, 19, 18, 16, 15, 12, 11, 10

19, 16, 18, 20, 11, 12, 10, 15

11, 12, 10, 16, 19, 18, 20, 15

10, 11, 12, 15, 16, 18, 19, 20

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the worst-case time complexity of inserting n elements into an empty linked list, if the linked list needs to be maintained in sorted order?

Θ(n^2)

Θ(1)

Θ(n)

Θ(n log n)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the worst-case time complexity of inserting n^2 elements into an AVL tree with n elements initially?

Θ(n^2 log n)

Θ(n^2)

Θ(n^4)

Θ(n^3)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following C program. What is the output of this program? #include struct Ournode{ char x,y,z; }; int main(){ struct Ournode p = {'1', '0', 'a'+2}; struct Ournode *q = &p; printf ("%c, %c", *((char*)q+1), *((char*)q+2)); return 0; }

0, c

0, a+2

'0', 'a+2'

'0', 'c'

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following C Program void f(int, short); void main() { int i = 100; short s = 12; short *p = &s; ___________ ; // call to f() } Which one of the following expressions, when placed in the blank above, will NOT result in a type-checking error?

f(i, *p)

i = f(i,s)

f(s, *s)

f(i, *s)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently. Which one of the following statements is CORRECT (n refers to the number of items in the queue)?

The worst-case time complexity for both operations will be Ω(n)

Worst case time complexity for both operations will be Ω(log n)

At most one operation can be performed on O(1) time but the worst-case time for the other operation will be Ω(n)

Both operations can be performed in O(1) time

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The result evaluating the postfix expression 10 5 + 60 6/ * 8 – is

284

71

213

142

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?