Archive for April 2014

Tree Search

Tuesday, 29 April 2014
Posted by Naveen's Blogs
#include< iostream > #include< cstdlib > #include< string > using namespace std; struct tree { int info; tree *Left, *Right; }; tree *root; class...
#include < iostream > #include < cstdlib > #include < string > using namespace std; class Dllist { private: typedef struct Node { string...
#include< iostream.h > #include< conio.h > #include< stdlib.h > class list { struct node { int data; node *link; }*p; public: ...

Shell Sort

Posted by Naveen's Blogs
#include< iostream.h > #include< constream.h > void read(int a[10],int n) { cout << "reading\n"; for(int i=0;i < n;i++) cin >> a[i];...

Sequential Search

Posted by Naveen's Blogs
#include< iostream > using namespace std; int main() { int arr[10]; int no_of_elements, key; bool found = false; cout<<"Enter the number of element: "; ...

Selection Sort

Posted by Naveen's Blogs
#include < iostream.h > const int MAX = 10 ; class array { private : int arr[MAX] ; int count ; public : array( ) ; void add (...

Quick Sort

Posted by Naveen's Blogs
#include #include #include #include int Partition(int low,int high,int arr[]); void Quick_sort(int low,int high,int arr[]); void main() { int *a,n,low,high,i; clrscr();...
#include < iostream.h > #include < conio.h > #include < stdlib.h > struct node { char name[20]; int age; float height; node *nxt; }; node...
#include< iostream.h > #include< conio.h > const int MAX=5; class pqueue { int front,rear; public: struct data { int val,p,o; ...
#include< iostream.h > #include< conio.h > const int MAX = 5; class cqueue { int a[MAX],front,rear; public : cqueue() { front=rear=-1;...
#include< iostream.h > #include< conio.h > #include< process.h > // Creating a NODE Structure struct node { int data; // data struct node *next; // link...

Merge Sort

Posted by Naveen's Blogs
#include <iostream.h> int a[50]; void merge(int,int,int); void merge_sort(int low,int high) { int mid; if(low<high) { mid=(low+high)/2; ...

Insertion Sort

Posted by Naveen's Blogs
#include < iostream.h > const int MAX = 10 ; class array { private : int arr[MAX] ; int count ; public : array( ) ; void add (...
#include< iostream.h > #include< conio.h > class cirdlink { struct node { int data; node *rnext; node *lnext; }*new1,*head,*tail,*ptr,*temp;...
#include< iostream.h> #include< conio.h> #define SIZE 20 class stack { int a[SIZE]; int tos; // Top of Stack public: stack(); void push(int); ...
# include < iostream.h > # include < conio.h > # define SIZE 20 class queue { int a[SIZE]; int front; int rear; public: queue(); ~queue();...
#include<iostream.h> #include<conio.h> #include<stdio.h> #include<stdlib.h> class path { int n; int p[10][10]; int a[10][10];...
#include < iostream > #include < cstdlib > #include < string > using namespace std; class Dllist { private: typedef struct Node { string...
#include< iostream > #define INFINITY 999 using namespace std; class Dijkstra { private: int adjMatrix[15][15]; int predecessor[15],distance[15]; bool...
#include<iostream> #include<stdlib.h> using namespace std; void create(); // For creating a graph void dfs(); // For Deapth First Search(DFS) Traversal. void bfs(); // For...
Program Limitations * This program Only process single digit operations * Can't handle unary operation * Only process left to right associativity #include< iostream > #include<...
#include<iostream> #include<stdlib.h> using namespace std; struct node { node *left; int value; node *right; }; node *curr=NULL; int addnode(node *, node...
#include<iostream> #include<stdlib> #include<conio> using namespace std; struct node { int element; node *left; node *right; int height; }; typedef...
#include<iostream> using namespace std; class CClass1 { public: char mStringData[10];; long int mDataMember1; long int mDataMember2; CClass1 *structpNextValue; ...
#include <iostream> using namespace std; template <class X> void bubble(X *data, int size) { register int a, b; X t; for(a=1; a < size; a++)...
Welcome to My Blog

Popular Post

Blogger templates

Powered by Blogger.

- Copyright © 2025 Data Structures using C++ -Robotic- Powered by Blogger - Designed by NAVEEN KUMAR -

6