gs gs121 Abstract Data Types - Singly Linked Lists - Quiz No.1

gs gs121 Data Structures and Algorithms Quiz

Online Quizzes Preparation

This quiz belongs to book/course code gs gs121 Data Structures and Algorithms of gs organization. We have 169 quizzes available related to the book/course Data Structures and Algorithms. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Abstract Data Types. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.

NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.

Question 1: Which of the following is not a disadvantage to the usage of array?
Question 4: Which of the following performs deletion of the last element in the list? Given below is the Node class.

class Node { protected Node next; protected Object ele; Node(Object e,Node n) { ele = e; next = n; } public void setNext(Node n) { next = n; } public void setEle(Object e) { ele = e; } public Node getNext() { return next; } public Object getEle() { return ele; } } class SLL { Node head; int size; SLL() { size = 0; } }
Question 5: What is the functionality of the following code?

public void function(Node node) { if(size == 0) head = node; else { Node temp,cur; for(cur = head; (temp = cur.getNext())!=null; cur = temp); cur.setNext(node); } size++; }
Question 7: How would you delete a node in the singly linked list? The position to be deleted is given.
Question 8: Which of these is not an application of a linked list?
Question 9: Which of the following piece of code has the functionality of counting the number of elements in the list?
Question 10: How do you insert an element at the beginning of the list?


Online Quizzes of gs121 Data Structures and Algorithms

Other DS related online quizzes

Other categories of gs Online Quizzes

Other organizations

Theme Customizer

Gaussian Texture



Gradient Background