Posts

StarUML

Image
click here to download click me

ORACLE SETUP

Image
ORACLE SETUP click here to download    click me

Infix to Postfix

Image
Program #include<iostream> #include<conio.h> #include<stdio.h> using namespace std; #define MAX 100 class stack{  int top;  char infix[MAX],postfix[MAX],s[MAX];  public:   stack()   {   top=-1; }   void read();   char Push(char);   char Pop();   int conversion();   char Prioity(char);   void display(); }; char stack::Push(char a){  if(top>MAX)  cout<"STACK is over flow";  else{   top++;   s[top]=a;  } } char stack::Pop(){  char item;  if(top==-1)     {        cout<<"\n Stack is under flow"<<endl;     }     else     { item=s[top];      top--;      return item; } } char stack::Prioity(char x){  switch(x){      case'(':   return 0;   case'+':   return 1;   case'-':   return 1;   case'*':   return 2;   case'/':   return 2; } } int stack::conversion(){  int k=0,i;char sp;  for(i=0;infix[i]!='\0';i++&&k++)  {  if(

JOSEPHUS PROBLEM

Image
JOSEPHUS PROBLEM CODE #include <iostream> using namespace std; int counter=0,i,k=0; struct Node{ int data; Node *next; }; class circular { public: int d; Node *rear,*prev,*next,*first; circular() { rear=NULL; } void insertNode(int d) { Node *New=new Node; //cin>>d; if (rear==NULL) { New->data=d; New->next=New; first=New; prev=New; first=New; rear=New; } else { New->data=d; New->next=first; prev->next=New; prev=New;     rear=New; } } void display() { Node *current=first; while(current !=rear)              { cout<<current->data<<" "; current=current->next; } if(current==rear)               {               cout<<current->data<<endl;; }   } int del

Queue

Image
Program #include<iostream> using namespace std; struct node{ int data; node *next; }; class ListQueue{ node *head,*tail; public: ListQueue() { head=NULL; tail=NULL; } void EnQueue(int info) { node *NewNode=new node;     NewNode->data=info;     NewNode->next=NULL;     if(head==NULL)     {     head=NewNode; } else { tail->next=NewNode; } tail=NewNode; } int DeQueue(){ if(IsEmpty()) { cout<<"Underflow occurs "; return 0; } int info; node *cur=head; info=head->data; head=head->next; delete cur;             return info; } int IsEmpty() { if(head==NULL) return 1; return 0; } }; int main() { ListQueue Q; Q.EnQueue(20); cout<<Q.DeQueue(); }

Stack

Image
Program #include<iostream> using namespace std; struct node { int data; node *next; }; class ListStack{ node *head; public: ListStack() { head=NULL; } void push(int info) { node *NewNode=new node; NewNode->data=info; NewNode->next=head; head=NewNode; } int pop() { if(IsEmpty()) { cout<<"Underflow occurs "; return NULL; } int info; node *cur=head; info=head->data; head=head->next; delete cur;             return info; } int IsEmpty() { if(head==NULL) return 1; return 0; } }; int main() { ListStack s; s.push(20); cout<<s.pop(); cout<<s.pop(); }

Operation on Single Linked List

Image
Program /*  * C++ Program to Implement Singly Linked List  */ #include<iostream> #include<cstdio> #include<cstdlib> using namespace std; /*  * Node Declaration  */ struct node {     int info;     struct node *next; }*start; /*  * Class Declaration  */ class single_llist {     public:         node* create_node(int);         void insert_begin();         void insert_pos();         void insert_last();         void delete_pos();         void sort();         void search();         void update();         void reverse();         void display();         single_llist()         {             start = NULL;         } }; /*  * Main :contains menu  */ main() {     int choice, nodes, element, position, i;     single_llist sl;     start = NULL;     while (1)     {         cout<<endl<<"---------------------------------"<<endl;         cout<<endl<<"Operations on singly linked list"