English

The keyword used by a class to acquire the properties of an interface is:

Advertisements
Advertisements

Question

The keyword used by a class to acquire the properties of an interface is:

Options

  • import

  • implements

  • extends

  • include

MCQ
Advertisements

Solution

implements

shaalaa.com
Basic Data Structures (Stack, Queue, Dequeue)
  Is there an error in this question or solution?
2021-2022 (March) Set 1

RELATED QUESTIONS

---data structure does not require contiguous memory allocation

(i) Array

(ii) String

(iii) Pointer Array

(iv) Linked List


What is Data Structure? 


State algorithm for inserting an element in an Array.


What is a Record ? How it is represented in Memory ?


A record is collection of_______

(i) Files
(ii) Arrays
(iii) Fields
(iv) Maps


Explain with a flowchart the following control structure:

Sequence Logic


Explain with a flowchart the following control structure:

Selection Logic


Define the following term with reference to the Tree:

Depth


Data items are divided into sub-item is called as ________.

(i) Group Item

(ii) Elementary Item

(iii) Nodes

(iv) Arrays


What is Array?


Write an algorithm for Traversing Linear Array.


Define Group Item


Define Elementary Item


Define Entity.


With suitable example show the relationship between Total Number of Nodes and Depth of Binary Tree.


 Explain memory representation of linked list with example.


State the principle by which the stack data structure works.


A Queue is a linear data structure in which the operations are performed based on FIFO (First In First Out).

Define a class Queue with the following details:

Class name Queue
Data member/instance variable:
dat[ ] array to hold the integer elements
cap stores the maximum capacity of the queue
front to point the index of the front
rear to point the index of the rear
Member functions/methods:
Queue(int max) constructor to initialize the data member cap = max, front = rear = 0 and create the integer array
void add_dat(int v) to add integers from the rear index if possible else display the message(“Queue full”)
int pop_dat( ) to remove and return elements from front, if any, else returns -999
void display() to display elements of the queue

Specify the class Queue giving the details of void add_dat(int) and int pop_dat( ). Assume that the other functions have been defined.

The main( ) function and algorithm need NOT be written.


Differentiate between a stack and a queue.


Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×