24 bytes

  • HOME
  • Algorithms
    blue
  • Bubble Sort
  • Bucket Sort
  • Insertion Sort
  • Selection Sort
  • Merge Sort
  • Quick Sort
  • Heap Sort
  • Counting Sort
  • Stack
  • Queue
  • Double Linked List
  • Binary Search Tree
  • Towers OF Hanoi

  • Java Programs
    green bullet
  • Download RMI Calculator
  • Download file
  • Clock applet
  • File Upload
  • JDOM Parser
  • Client server
  • Udp Client server
  • Sudoku Solver

  • System Programming
  • Newtwork Sniffer
  • Good Links
    green bullet
  • Free Source Code
  • Top Coder
  • Code Project
  • Learn Today
  • Concept
  • Intresting Programs
    green bullet
  • Prime Number
  • GCD Euclids
  • Permutations


  • Google
     
    Web 24bytes.com



    Insertion Sort in c++
    
    
    #include < iostream.h >
    #include < conio.h >
       
    void sort(int * a) {
    
      for (int j = 2; j < 10; j++) {
        for (int k = 0; k < j; k++) {
          if (a[j] < a[k]) {
            int temp = a[k];
            a[k] = a[j];
            a[j] = temp;
          }
        }
      }
    
      for (int i = 0; i < 10; i++) {
        cout << a[i] << "\n";
      }
    
    }
    
    void main() {
      clrscr();
      int a[] = {
          1, 4, 6, 8, 0, 9, 7, 5, 2, 3};
      sort(a);
    }
    
    Insertion Sort in c++
    request a code or suggestion


    Email:
    Category


    Google
     
    Web 24bytes.com
    . original template by Aran Down.