
Data Structure LAB VIVA 1
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Rejimoan R
Used 5+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
For getting best time complexity in the worst case scenario, which type of sorting algorithms are used?
Bubble sort of algorithm
Selection sort of algorithm
Quick sort of algorithm
Merge sort of algorithm
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The five items: A, B, C, D, and E are pushed in a stack, one after other starting from A. The stack is popped four items and each element is inserted in a queue. The two elements are deleted from the queue and pushed back on the stack. Now one item is popped from the stack. The popped item is
A
B
C
D
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the function f defined below.
struct item
{
int data;
struct item next;
};
int f(struct item p)
{
return (
(p == NULL) ||
(p->next == NULL) ||
(( p->data <= p->next->data) && f(p->next))
);
}
For a given linked list p, the function f returns 1 if and only if
not all elements in the list have the same data value.
the elements in the list are sorted in non-decreasing order of data value
the elements in the list are sorted in non-increasing order of data value
None of them
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following points is/are true about Linked List data structure when it is compared with array?
The size of array has to be pre-decided, linked lists can change their size any time.
It is easy to insert and delete elements in Linked List
Random access is not allowed in a typical implementation of Linked Lists
All of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many stacks are needed to implement a queue. Consider the situation where no other data structure like arrays, linked list is available to you.
4
3
2
1
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is given below: 10, 8, 5, 3, 2 Two new elements ”1‘ and ”7‘ are inserted in the heap in that order. The level-order traversal of the heap after the insertion of the elements is:
10, 8, 7, 5, 3, 2, 1
10, 8, 7, 2, 3, 1, 5
10, 8, 7, 1, 2, 3, 5
10, 8, 7, 3, 2, 1, 5
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are
Full: (REAR+1) mod n == FRONT, empty: REAR == FRONT
Full: (REAR+1) mod n == FRONT, empty: (FRONT+1) mod n == REAR
Full: (FRONT+1) mod n == REAR, empty: REAR == FRONT
Full: REAR == FRONT, empty: (REAR+1) mod n == FRONT
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
INTERNET
Quiz
•
University
20 questions
Round 1 ( RHA Learner Contest )
Quiz
•
University
11 questions
Determining System Requirements
Quiz
•
University
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
10 questions
Planning and Implementation of Information Security
Quiz
•
University
20 questions
Network topologies
Quiz
•
8th Grade - University
20 questions
Software Engineering Quiz 1
Quiz
•
University
10 questions
Machine Learning (Introduction)
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
