Knowledge in Data Structures & algorithms

Algorithm

Introduction to algorithm by Tcormen

Algorithm

Algorithm by E.horowitz & T sahani

Data Structure

Data Structure Using C by Reema Thareja

Design and Analysis of Algorithms:The complete reference

Design and analysis of algorithms. Asymptotic complexity, O() notation. Sorting and search. Algorithms on graphs: exploration, connectivity, shortest paths, directed acyclic graphs, spanning trees. Design techniques: divide and conquer, greedy, dynamic programming. Data structures: heaps, union of disjoint sets.The content provides a self explanatory insight on the subject.primarily for students of 2nd year.

Regression Case

Interesting Case. Please use and open and support Viden.io

INFO ON DSA

A data structure is a specialized format for organizing and storing data. General data structure types include the array, the file, the record, the table, the tree, and so on.

Double Ended Queue

# include<stdio.h> #include<process.h> #define MAX 30 typedef struct dequeue { int data[MAX]; int rear,front; }dequeue; void initialize(dequeue *p); int empty(dequeue *p); int full(dequeue *p); void enqueueR(dequeue *p,int x); void enqueueF(dequeue *p,int x); int dequeueF(dequeue *p); int dequeueR(dequeue *p); void print(dequeue *p); void main() { int i,x,op,n; dequeue q; initialize(&q); do { printf("\n1.Create\n2.Insert(rear)\n3.Insert(front)\n4.Delete(rear)\n5.Delete(front)"); printf("\n6.Print\n7.Exit\n\nEnter your choice:"); scanf("%d",&op); switch(op) { case 1: printf("\nEnter number of elements:"); scanf("%d",&n); initialize(&q); printf("\nEnter the data:"); for(i=0;i<n;i++) { scanf("%d",&x); if(full(&q)) { printf("\nQueue is full!!"); exit(0); } enqueueR(&q,x); } break; case 2: printf("\nEnter element to be inserted:"); scanf("%d",&x); if(full(&q)) { printf("\nQueue is full!!"); exit(0); } enqueueR(&q,x); break; case 3: printf("\nEnter the element to be inserted:"); scanf("%d",&x); if(full(&q)) { printf("\nQueue is full!!"); exit(0); } enqueueF(&q,x); break; case 4: if(empty(&q)) { printf("\nQueue is empty!!"); exit(0); } x=dequeueR(&q); printf("\nElement deleted is %d\n",x); break; case 5: if(empty(&q)) { printf("\nQueue is empty!!"); exit(0); } x=dequeueF(&q); printf("\nElement deleted is %d\n",x); break; case 6: print(&q); break; default: break; } }while(op!=7); } void initialize(dequeue *P) { P->rear=-1; P->front=-1; } int empty(dequeue *P) { if(P->rear==-1) return(1); return(0); } int full(dequeue *P) { if((P->rear+1)%MAX==P->front) return(1); return(0); } void enqueueR(dequeue *P,int x) { if(empty(P)) { P->rear=0; P->front=0; P->data[0]=x; } else { P->rear=(P->rear+1)%MAX; P->data[P->rear]=x; } } void enqueueF(dequeue *P,int x) { if(empty(P)) { P->rear=0; P->front=0; P->data[0]=x; } else { P->front=(P->front-1+MAX)%MAX; P->data[P->front]=x; } } int dequeueF(dequeue *P) { int x; x=P->data[P->front]; if(P->rear==P->front) //delete the last element initialize(P); else P->front=(P->front+1)%MAX; return(x); } int dequeueR(dequeue *P) { int x; x=P->data[P->rear]; if(P->rear==P->front) initialize(P); else P->rear=(P->rear-1+MAX)%MAX; return(x); } void print(dequeue *P) { if(empty(P)) { printf("\nQueue is empty!!"); exit(0); } int i; i=P->front; while(i!=P->rear) { printf("\n%d",P->data[i]); i=(i+1)%MAX; } printf("\n%d\n",P->data[P->rear]); }

Learn C programming

Hey, in case you are looking for a good C programming tutorial, then you are at correct place.  I am going to start C programming tutorial for all who want to learn. Starting from very basic to advanced topics in C will be covered in this tutorial. So, we will start from very basic topics like a variable, data type, and all these things then we will move towards array, functions, strings etc. After that, we will move to data-structures. So, it's going to be very excited and the teaching technique is going to be unique. Hope, you will enjoy this course. It's completely free of cost. So, don't miss this opportunity. See you soon.

3rd Semester DSA Complete notes, KIIT University

These are the series of documents on data structure and algorithms . Each pdf is includes a separate topic on dsa. The document is written is easy format for the enginnering students and the students preparing for Gate examinations

programming in c.

its a bunch of array questions,designed in a very subtle way.

data structures and algorithms

data structures and algorithms includes introduction,array,sorting,searching,linked lists,graphs and stacks and queues.