• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Sql
  • php
  • C program
  • Seo

Codelack.com

  • Home
  • C++
  • networking
  • Sql server
    • what is rdbms | one to one | one to many | many to many relation-codlack
    • sql server create table
    • code rules in sql server
  • ASP.NET
    • control state in asp.net
    • cookie in asp.net
    • datalist control in asp .net
    • Using ASP.NET To Send Email
    • application state in asp.net
    • file upload control in asp.net
  • contact us
  • Data structure
    • what is Data structure
    • doubly linked list program in c
    • Array in data structure
    • circular queue in data structure
    • Linear data structure
    • Delete node at any position in singly linked list
    • dequeue in data structure
    • implementation of stack using a Linked list in data structure
    • implementation of stack using array in data structure
    • linked list algorithm
    • linked list in data structure
  • C
    • continue and break in c
    • history of c programming language
    • array program in c
    • c programming practice questions
    • enumeration in c
    • C programs with solutions
    • Characteristic of c
    • print 1 to 100 without using loop in c program
    • two single dimension 2D array in c
  • php
    • php
    • Variables in PHP
    • Scalar data types in php
    • Output function in php
    • how to use php string functions | example of string function
    • point to point configuration
    • error in php
    • Array in  php

queue data structure

what is queue

A queue is a linear structure implement in FIFO(first In first out) manner where insertions can occur only at the “rear” end and deletions can occur only at the “front” end.

OR

 It  is  linear data structure used to represent the linear list and permits  deletion to be performed  at one end of the  list called the  “front of the queue” and the insertions at the other end is called “rear of the queue”.

It is  also called “FIFO” system and “FCFS”

FIFO = first in  first out

FCFO = first come first service

There are three types of operations can be applied into a queue

1 insert   

inserts item  at the rear of the queue.  adds a thing to the queue . on the off chance that the line is full, at that point it is said to be a flood condition.

2  remove

deletes item to the front  element of the queue. expels a thing from the queue. The thing are flown in a similar request in which they are pushed. On the off chance that the queue is unfilled, at that point it is said to be an undercurrent condition.

3 display

the  third operation empty à  return true  or false depending on whether or not the queue contains  any   element.  show all components without erasure.

 

Describe the similarities and differences between Queues and Stacks.

Similarities:-

1. Both queues and stacks are special cases of linear lists.

2. Both can be implemented as arrays or Linked lists.

Differences :-

1. A stack is a LIFO list, A queue is a FIFO list.

2. There are no variations of stack, a que, however, may be circular or deque.

Variations in Queues :-

It can be used in several forms and ways, depending upon the requirements of the program. There are two popular variatins of queues :-

Circulation Queues

Dequeues Queues

 

Primary Sidebar

sql

  • introduction of sql
  • database management system
  • hierarchical database management system
  • what is rdbms | one to one | one to many | many to many relation-codlack
  • codd rules in sql server
  • Character Data Type
  • constraint unique
  • sql server create table

Ads

data structure

  • Data structure
  • Linear data structure
  • Array in data structure
  • What is a algorithm
  • stacks in data structure
  • queue data structure
  • dequeue in data structure
  • Priority queue
  • circular queue in data structure
  • linked list algorithm
  • Delete node in singly linked list
  • tree in data structure
  • implementation of stack using array in data structure
  • implementation of stack using a Linked list in data structure
  • Doubly Linked List Implementation

C programming

  • history of c programming language
  • C programs with solutions
  • Characteristic
  • constraint unique
  • continue and break
  • doubly linked list program in c
  • dynamic memory allocation
  • enumeration
  • print 1 to 100 without using loop
  • Variable declaration

c++

  • Introduction to C++ | similarities of  C++ structure and  class
  • default argument in c++
  • access specifiers in c++
  • Function In C++
  • friend function in c++
  • constructor in c++
  • destructor in c++ | How to call destructor C++
  • exception handling in c++

Categories

array multiplication (1) asp.net (10) B.ed (1) C# (1) c# (1) C++ (2) C program (3) FormView control (1) php (2) Seo (5) Sql (1) Uncategorized (12)
disclaimer

Copyright © 2022 · codelack.com