Tag Archives: data structure

stack using array in c code

Before going through stack using array in c code, let us know what is stack? Stack is a linear data structure  implements as a last in first out data operation. stack using array in c code #define MAX 4 //you can take any number to limit your stack size #include<stdio.h> #include<conio.h> int stack[MAX]; int top; void push(int token) … Continue reading stack using array in c code

Implementation of Stack using linked list in c code

what is stack? Stack is a linear data structure which implements data on last in first out criteria. Here is a c program to implement stack using linked list. Implementation of Stack using linked list in c code #include <stdio.h> #include <stdlib.h> struct Node { int Data; struct Node *next; }*top; void popStack() { struct … Continue reading Implementation of Stack using linked list in c code

circular queue c program implementation

circular queue c program implementation. Queue is a data structure which uses FIFO (First in first out) principle. Queue can be implemented as simple queue, dequeue and circular queue. Circular queue c is also implemented as same as simple queue, the main difference is that in circular queue last element will again points to first element as shown … Continue reading circular queue c program implementation

Program for c deque implementation input-restricted and output-restricted

C Deque differs from the simple queue data type or First-In-First-Out List (FIFO), where elements can only be added to one end and removed from the other. This general data class has some possible sub-types:An input-restricted deque is one where deletion can be made from both ends, but insertion can only be made at one end. An … Continue reading Program for c deque implementation input-restricted and output-restricted

C program for dfs (depth first search)

c program for dfs(depth first search) using array. DFS is Depht first Search, which is used to traverse un-weighted Graph.  There are two most popular graph traversing technique, i.e DFS and BFS. DFs make use of Stack while, BFS make use data structure Queue. Also see c program for bfs. C program for dfs #include<stdio.h> #include<conio.h> char stack[20]; int … Continue reading C program for dfs (depth first search)

C program for bfs (breadth first search)

C program for bfs (breadth first search) using array. BFS is Breadth first Search, which is used to traverse unwieghted Graph. There are two most popular graph traversing technique, i.e DFS and BFS. DFs make use of Stack while, BFS make use data structure Queue. Also see c program to implement DFS. C program for bfs … Continue reading C program for bfs (breadth first search)

c program for dfa (deterministic finite automata)

c program for dfa (deterministic finite automata). Let us first know what is DFA or let us again revise the concept of DFA? Automation are basically language acceptor or language recognizer. A finite automata is a collection of 5-tuple(Q,∑,∂,q0,F). Where Q=finite set of states ∑=input symbol ∂=transition function q0=initial state F=set of final state c program for dfa #include<stdio.h> #include<conio.h> … Continue reading c program for dfa (deterministic finite automata)