coding_quiz3

coding_quiz3

University

11 Qs

quiz-placeholder

Similar activities

Computational Thinking in Python[Quiz 3]

Computational Thinking in Python[Quiz 3]

University

15 Qs

JRB2 Quiz 4

JRB2 Quiz 4

University

10 Qs

TOOLS FOR AD & TECHNOLOGY DEVELOPMENT (W4-W6)

TOOLS FOR AD & TECHNOLOGY DEVELOPMENT (W4-W6)

University

10 Qs

Understanding Email, Contacts and Calendaring

Understanding Email, Contacts and Calendaring

University

10 Qs

Quiz IT Audit 7 Gabungan

Quiz IT Audit 7 Gabungan

University

10 Qs

BB

BB

University

10 Qs

Tree and Planar Graph

Tree and Planar Graph

University

10 Qs

CodeMonkey for B.Ed IT

CodeMonkey for B.Ed IT

University

10 Qs

coding_quiz3

coding_quiz3

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Ankur Aggarwal

Used 7+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Jaswinder has a book of tickets and wants to store ticket numbers in a data structure. New ticketsare added to the end of the booklet. Ticket at the top of the stack is issued to the customer. Which data structure should Jaswinder use to represent the ticket booklet?

Queue

Stack

Array

Graph

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Q is an empty queue. The following operations are done on it:

ADD 5

ADD 7

ADD 46

DELETE

ADD 13

DELETE

DELETE

ADD 10

What will be the content of Q after these operations. Front is marked by (F) and Rear is markedby (R).

10(R) 13(F)

5(R) 10(F)

13(R) 10(F)

10(R) 5(F)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A stack is implemented as a linear array A[0…N-1]. Noor writes the following functions for popping an element from the stack.

function POP( top, N ){

if( X ){

top = top - 1

}else{

print "Underflow"}

return top}

Fill in the condition X

top< N-1

top<n

top>1

top >= 0

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A stack is implemented as a linear array A[0…N-1]. Farhan writes the following functions for pushing an element E in to the stack.

function PUSH( top, E, N ){

if(X){

top= top+1A[top] = E

}else{

print "Overflow"}

return top}

Fill in the condition X

top< N

top <n-1

top > 0

top > 1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A is an empty stack. The following operations are done on it.

PUSH(1)

PUSH(2)

POP

PUSH(5)

PUSH(6)

POP

What will the stack contain after these operations. (Top of the stack is underlined)

5 6

1 5

2 5

2 6

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The array A has n elements. We want to determine the position of X in the array. We know that X is present in the array A and X can be present at any location in the array with equal probability. How many comparisons will be required on average to find the element X using linear search?

n

2*n

(n+1)/2

n^2

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Srishti writes a program to find an element in the array A[5] with the following elements in order: 8 30 40 45 70. She runs the program to find a number X. X is found in the first iteration of binary search. What is the value of X?

40

8

70

30

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers