Monday, June 4, 2012

Reference Material



C++
1. C++ FAQ
2. Test you skill in C++
3. Test you C skill
4. www.learncpp.com/
5. http://www.cppcoffe.blogspot.in/
6. http://www.geeksforgeeks.org/
7. http://www.tutorialspoint.com/cplusplus
8. Effective C++
  • https://www.youtube.com/playlist?list=PLTZbNwgO5eboiNmjGo8H-IIZU3LNb1i8G
9. http://c-pointer.blogspot.in/

10. http://www.careercup.com/



Data Structure
1.Data Structures ( a pseudocode approach with c++)
2.Data Structure and algorithm made easy
3.https://www.hackerrank.com/
4. http://www.geeksforgeeks.org/
5. googlegeeks group
6. http://www.careercup.com/
7. IIT delhi video lecture
8. Standford Data Structure Class
9. MIT open course Data Structure
10.Introduction to Algorithm
11.https://www.codechef.com/


DataBase
1.Crack IT interview DataBase
2. http://www.programmerinterview.com/index.php/database-sql/introduction/
3. http://sql-plsql.blogspot.in/2009/04/sql-interview-questions.html

4. http://www.orafaq.com/faq/what_are_the_difference_between_ddl_dml_and_dcl_commands
5. http://www.1keydata.com/sql/sql.html 
6. http://plsql-tutorial.com/index.htm

7. http://www.sqlcourse.com/index.html (online Compiler)
8. http://www.java2s.com/Tutorial/Oracle/CatalogOracle.htm 
9. http://apex.oracle.com/i/index.html

Unix Reference:
1.Crack IT interview with Unix DataBase
2.http://www.folkstalk.com/2011/11/top-unix-interview-questions-part-1.html 
3.www.thegeekstuff.com/2010/11/50-linux-commands/
4.http://faq.programmerworld.net/networking/unix-interview-questions-answers.html

5.linux.101hacks.com/linux-commands/cut-command-examples/
6.http://www.gointerviews.com/top-50-linux-interview-questions/ 
7.http://www.theunixschool.com/2012/04/linux-interview-questions-part-1.html  


Design Pattern:
1.Head & First Design Pattern (Book)
2.http://sourcemaking.com/design_patterns
3. http://www.javabeat.net/2009/02/design-patterns-interview-questions/
4. http://javarevisited.blogspot.in/2012/06/20-design-pattern-and-software-design.html

System Programming:
1.Galvin -Operating System Concept (7 Edition)
2. Programming with POSIX Threads

UML Programming
1. UML-Distilled-Standard-Addison-Wesley-Technology


Verbal & Reasoning Reference :
1. Wren & Martin English Grammar Book
2. Word Power Made Easy
3.  Barron English Book

Tcl Programming Tutorial

Good Link
1. Trick question  
2. Static object
3. Boost Pointer
4.  Thinking in c++ volume two
5.  C programming language
6. C++ notes
7. Encapsulation vs abstraction
8. Parashift Interview Question
9. Counter view
10.explicit constructor
11.scoped_ptr related link
12. Function Pointer
13. Call Back Function
14. call a C library from C++ code or   call a C++ library from C code?
15. Empty class
18. Vector inner implemention
19. Binary Tree
22. C++ Traits
23. FLEX Tutorial

Some Follow up url 

1.Git Hub
2. Hacker Rank
4.Open Source ProjectGoogle code jam(Good for beginner) 
8. Graph Theory implementation
9. Algo

Saturday, May 19, 2012

Tree_Program

 #include<iostream>  
 #define size 3  
 using namespace std;  
 class node  
 {  
  public:       
  int data;  
  node *left;  
  node *right;  
 };  
 class tree  
 {  
  public:  
  node *root;  
  tree();  
  void create_tree(int data);  
  void inorder_traverse(node *s);  
  void print_data();  
 };  
 tree::tree()  
 {  
      root=NULL;  
 }  
 void tree::create_tree(int data)  
 {  
   node *temp = new node;  
   temp->data = data;  
   temp->left =NULL;  
   temp->right =NULL;  
   if(root ==NULL)  
        root =temp;  
   else  
   {  
       node *p =root;  
       node *trail =NULL;  
      while(p!=NULL)  
       {   
         root=p;  
        if(p->data > data)  
         {  
             p =p->left;  
         }  
         else  
           {  
              p=p->right;  
           }  
       }  
       if(root->data > data)  
       {  
         root->left =temp;  
       }  
       else  
       {        
         root->right = temp;  
       }  
   }  
 }  
 void tree::inorder_traverse(node *s)  
 {   
    if(s)       
    {  
         inorder_traverse(s->left);  
         cout<<s->data<<"  ";  
         inorder_traverse(s->right);  
    }  
 }  
 void tree::print_data()  
 {  
      inorder_traverse(root);  
 }  
 int main()  
 {  
  int data;  
  tree t;  
  for(int i=0;i<3;i++)  
  {  
      cout<<"Enter data";  
       cin>>data;  
       t.create_tree(data);  
  }  
  cout<<"inorder: traverse :"<<endl;  
  t.print_data();  
  return 0;  
 }  
Create_tree with level_order_traversal
 #include<iostream>  
 using namespace std;  
 class node  
 {   
   public:       
   int data;  
   node *left;  
   node *right;  
 };  
 class tree  
 {  
   public:  
   node *root;  
   tree();  
   void create_tree(int data);  
   void print_tree();  
   void tree_level_order_traverse(node *root);  
 };  
 tree::tree()  
 {  
   root =NULL;  
 }  
 void tree::create_tree(int data)  
 {  
   node *temp = new node;  
   temp->data = data;  
   temp->left = NULL;  
   temp->right =NULL;  
   if(root==NULL)  
     root=temp;  
   else  
   {  
    node *p=root;  
    node *trail =NULL;  
    while(p!=NULL)  
    {  
      trail=p;  
       if(p->data > data)  
         p=p->left;  
      else  
         p=p->right;  
    }  
    if(trail->data > data)  
       trail->left = temp;  
    else  
       trail->right = temp;  
   }  
 }  
 void tree::tree_level_order_traverse(node *root)  
 {  
   node *data_store[10] = { (node*)0} ;  
   int size=0;  
   int follow_variable=0;  
   while(root)    
   {  
    cout<<root->data<<" :";  
    if(root->left)  
      data_store[size++]=root->left;  
    if(root->right)  
    data_store[size++]=root->right;  
     root=data_store[follow_variable++];  
   }  
 }  
 void tree::print_tree()  
 {  
      tree_level_order_traverse(root);  
 }  
 int main()  
 {  
   tree t;       
   for(int i=0;i<8;i++)  
       t.create_tree(i);  
   cout<<"create successful"<<endl;  
   t.print_tree();   
   return 0;  
 }  
Tree_header_file
 #include<iostream>  
 using namespace std;  
 class node  
 {  
   public:  
   int data;  
   node *left;  
   node *right;  
 }  
 class tree  
 {  
  public:  
  node *root;  
  tree();  
  void create_tree(int data);  
 };  
 tree::tree()  
 {  
  root =NULL;  
 }  
 void tree::create_tree(int data)  
 {  
      node *temp= new node;  
      temp->data = data;  
      temp->left =NULL;  
      temp->right =NULL;  
      node *p=root;  
      while(p!=NULL)  
      {  
       root =p;  
        if(p->data > data)  
          p=p->left;  
        else  
          p=p->right;  
      }  
      if(root->data > data)  
           root->left = temp;  
      else  
           root->right = temp;  
 }  

Find_Max_Element_without_Recursion

 template<class T>  
 int tree<T>::find_max_element(node *root)  
 {  
  node *queue[10]= {(node*)0};  
  node *p=root;  
  int data;  
  int size=0;  
  int follow_variable =0;  
  int max=0;  
  while(p!=NULL)  
  {  
   if(max < p->data)  
       max = p->data;         
   if(p->left)  
        queue[size++] = p->left;  
   if(p->right)  
        queue[size++] = p->right;  
    p = queue[follow_variable++];  
  }    
    cout<<"the max data :"<<max<<endl;  
  return max;  

Find_Max_Element_with_Recursion

 int tree<T>::find_max_element(node *root)  
 {  
  int root_value;  
  int left;  
  int right;  
  int max =0;  
  if(root!=NULL)  
  {  
    root_value = root->data;  
    left = find_max_element(root->left);  
    right = find_max_element(root->right);  
    if(right > left)  
         max=right;  
    else  
         max=left;  
  if(root_value > max)  
       max=root_value;  
  }  
  return max;  
Reverse_level_order_traverse
 void tree::reverse_level_order(node *root)  
 {  
   node *temp_storage[10]= {(node *)0};  
   int size =0;  
   int flow_variable =0;  
   while(root)  
   {  
    cout<<" "<<root->data;  
    if(root->right)  
    {  
          temp_storage[size++]=root->right;  
    }  
    if(root->left)  
    {  
         temp_storage[size++] = root->left;  
    }   
    root=temp_storage[flow_variable++];  
  }  
 }