Basic CS-Data Structures [3i Infotech Placement]: Sample Questions 11 - 12 of 52

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 11

Data Structures

Write in Short

Short Answer▾

What is immediate addressing mode?


The addressing mode in which the data operand is a part of the instruction itself is the immediate addressing mode.



Question 12

Data Structures

Describe in Detail


Define of common data structures:



General purpose of linked list

Singly vs. doubly linked lists.


  • Stack:
    • Stack is a linear data structure which follows a particular order in which the operations are performed.
    • The order LIFO (Last In First Out) or FILO (First In Last Out) .
  • Queue:
    • Linear data structure.
    • Additions are made at the end or tail of the queue while removals are made from the front or head of the queue.
    • Queue is referred to FIFO structure for its First in First Out Access.
  • General purpose of linked list
    • A linear data structure
    • Common data structure consisting of group of nodes in a sequence divided in two parts.
    • Each node consists of its own data and the address of the next node and forms a chain.
    • Used to create trees and graphs.
  • Singly vs. doubly linked lists.
Difference between Singly and Doubly Linked List
Singly Linked ListDoubly Linked List
Allow one way travel- can access successorAllows two way travel using two pointers next and previous
Uses less memory per nodeUses more memory per node than singly linked list
Complexity of insertion and deletion at known position is O (n)Complexity of Insertion and Deletion at known position is O (1) .
There is a allowing delete from a singly-linked list in O (1) , but the list must be circularUsed in places where singly-linked lists would not work but they require slightly more “housekeeping” , and are slightly less efficient on insertions as the result
Each node contains at least two parts:
  1. Info
  2. link
Each node contains at least three parts:
  1. Info
  2. Link to next node
  3. Link to previous node.

Developed by: