हिंदी

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

Advertisements
Advertisements

प्रश्न

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

विकल्प

  • import

  • implements

  • extends

  • include

MCQ
Advertisements

उत्तर

implements

shaalaa.com
Basic Data Structures (Stack, Queue, Dequeue)
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2021-2022 (March) Set 1

संबंधित प्रश्न

What is Data Structure? 


Write an algorithm for the binary search method. Explain algorithm with a suitable example.


Explain with a flowchart the following control structure:

Sequence Logic


Explain with a flowchart the following control structure:

Selection Logic


Explain with a flowchart the following control structure:

Iteration Logic


Explain Bubble Sort Algorithm with. suitable example.


write difference between Linear Search and Binary Search.


How linked list are represented in Memory?


Define the following terms with reference to Tree : Sibling


Write an algorithm for Traversing Linear Array.


Define Elementary Item


What is a binary tree?


What is Record?


What is Binary Tree ? Draw the Tree diagram for the expression. 
B = (3R -5T)2 - (R + Q3)


 Explain memory representation of linked list with example.


A double ended queue is a linear data structure which enables the user to add and remove integers from either ends i.e., from front or rear.

The details for the class deQueue are given below:

Class name deQueue

Data members/instance variables:

Qrr[] array to hold integer elements
lim maximum capacity of the dequeue
front to point the index of the front end
rear  to point the index of the rear end

Methods/Member functions:

deQueue(int 1) constructor to initialise lim = 1, front = 0 and rear =0
void addFront(int v) to add integers in the dequeue at the front end if possible, otherwise display the message “OVERFLOW FROM FRONT”
void addRear(int v) to add integers in the dequeue at the rear end if possible, otherwise, display the message “OVERFLOW FROM REAR”
int popFront() removes and returns the integers from the front end of the dequeue if any, else returns — 999
int popRear ( )  removes and returns the integers from the rear end of the dequeue if any, else returns — 999
void show( ) displays the elements of the dequeue

Specify the class deQueue giving details of the function void addFront(int) and int popFront(). 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×