Data Structure - Linear + None Linear

Published On : 26, Apr 2020

Data Structures

 

 

data structure is a particular way of organizing data in a computer so that it can be used effectively.

For example, we can store a list of items having the same data-type using the array data structure.

Like StackQueue is a linear structure which follows a particular order in which the operations are performed. The order is First IFirst Out (FIFO).  A good example of queue is any queue of consumers for a resource where the consumer that came first is served first.
The difference between stacks and queues is in removing. In a stack we remove the item the most recently added; in a queue, we remove the item the least recently added.

Operations on Queue:
Mainly the following four basic operations are performed on queue:

Enqueue: Adds an item to the queue. If the queue is full, then it is said to be an Overflow condition.
Dequeue: Removes an item from the queue. The items are popped in the same order in which they are pushed. If the queue is empty, then it is said to be an Underflow condition.
Front: Get the front item from queue.
Rear: Get the last item from queue.

 

LEADERBOARD

₹ 89

Computer Science

Questions 100
MEDIUM RECTANGLE

You might like in Computer Science

Machine Learning Unsupervised Learning Top Questions and Answers

39 questions

Machine Learning Unsupervised Learning Top Questions and Answers

Data Structure - Linear + None Linear

100 questions

In computer science, a data structure is a data organization, management, and storage format that enables efficient access and modification.