Tuesday 13 December 2016

Data Structure & Algorithms | Queue

 DATA STRUCTURE

QUEUE

Queue is an abstract data structure, somewhat similar to Stacks. Unlike stacks, a queue is open at both its ends. One end is always used to insert data (enqueue) and the other is used to remove data (dequeue). Queue follows First-In-First-Out methodology, i.e., the data item stored first will be accessed first.

#include<stdio.h>
#include<stdlib.h>
#define Max 5
int a[Max];
int rear=-1;
int front=-1;
void insert(int);
void delete();
void display();
void main()
{
    int c,item;
    do
    {
        printf("\nPress 1:Insert\nPress 2:Delete\nPress 3:Diplay\nPress 0:Exit\n");
        scanf("%d",&c);
        switch(c)
        {
            case 1:printf("Enter Element\n");
                    scanf("%d",&item);
                    insert(item);
                    break;
            case 2:delete();
                    break;
            case 3:display();
                    break;
            case 0:exit(0);
        }
    }while(1);
}
void insert(int item)
{
    if(rear==Max-1)
    printf("Insertion not Possible\n");
    else
    {
        rear++;
        a[rear]=item;
    }
}
void delete()
{
    if(rear==front)
    printf("Deletion not Possible\n");
    else
    {
        front++;
        printf("Deleted Element %d",a[front]);
    }
}
void display()
{
    int i;
    printf("Queue :");
    for(i=front+1;i<=rear;i++)
    printf("%d ",a[i]);
}

,Thanks
Bikki Mahato

Friday 9 December 2016

Canon Combo of PG-88 Fine And CL-98 Ink Cartridge (PG-88 Black:CL-98 Color)

Buy this amazing canon combo ink cartridges, i.e , PG-88 Black , CL-98 Color

Features:-

  • Canon CL-98 Ink Cartridge is compatible with Pixma E510 / E610
  • Canon PG-88 ink cartridge is compatible with the Pixma E 500 and E 600 printer
  • Color Type : PG 88- Black, CL 98- Color
  • Cartridge breathes life into every print, high-quality make and diligent performance
  • Package content: 2 ink cartridge 



Buy from the link below to get discounts and cashbacks!!!
http://amzn.to/2ha08uH

Technical Details:-

BrandCanon
ColourTri-color
Item Height10 Centimeters
Item Width10 Centimeters
Item Weight141 g
Product Dimensions10 x 10 x 10 cm
Item part numberCNNCMB_88_98-02