
Data Structures
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
M CSE
Used 1+ times
FREE Resource
Enhance your content in a minute
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the functionality of the following piece of code? public void display() { if(size == 0) System.out.println("underflow"); else { Node current = first; while(current != null) { System.out.println(current.getEle()); current = current.getNext(); } } }
display the list
reverse the list
reverse the list excluding top-of-the-stack-element
display the list excluding top-of-the-stack-element
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following doubly linked list: head-1-2-3-4-5-tail. What will be the list after performing the given sequence of operations? Node temp = new Node(6,head,head.getNext()); Node temp1 = new Node(0,tail.getPrev(),tail); head.setNext(temp); temp.getNext().setPrev(temp); tail.setPrev(temp1); temp1.getPrev().setNext(temp1);
head-0-1-2-3-4-5-6-tail
head-1-2-3-4-5-6-tail
head-6-1-2-3-4-5-0-tail
head-0-1-2-3-4-5-tail
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is false about a doubly linked list?
We can navigate in both the directions
It requires more space than a singly linked list
The insertion and deletion of a node take a bit longer
Implementing a doubly linked list is easier than singly linked list
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?
ABCD
DCBA
DCAB
ABDC
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
Rear = MAX_SIZE – 1
Front = (rear + 1)mod MAX_SIZE
Front = rear + 1
Rear = front
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following postfix expression? ab*cd*+ where a=2,b=2,c=3,d=4.
16
12
14
10
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the stack | 5 | | 4 | | 3 | | 2 |. At this point, ‘*’ is encountered. What has to be done?
5*4=20 is pushed into the stack
* is pushed into the stack
2*3=6 is pushed into the stack
* is ignored
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
Chapter 1: Introduction to Computer
Quiz
•
University
20 questions
Python Recap
Quiz
•
7th Grade - University
20 questions
IT Essential UIUX Chapter 1 & 2
Quiz
•
University
20 questions
SECOND QUIZ
Quiz
•
University
20 questions
STM 2013 : FORMATIF T3-FORM & REPORT
Quiz
•
University
20 questions
Chapter 3: Strategic Initiatives for implementing CA
Quiz
•
University
20 questions
DWDM-2
Quiz
•
University
20 questions
HCI - UCD
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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade
