Thread: Pseudo Coding

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    3

    Unhappy Pseudo Coding

    [tag]
    Code:
    I cannot figure out how to write the pseudo code for this function, I need help.
    
    
    void Insertion( long array[], long left, long right )
     {
    
    
      long i;
    
      for( i = right; i > left; i-- )
    
        Swap( array[i - 1], array[i] );
    
      for( i = left + 2; i <= right; i++ )
       {
    
        long j = i, item = array[i];
    
        while( item < array[j - 1] )
    
        {
    
        array[j] = array[j - 1];
        j--;
    
        }
    
        array[j] = item;
    
      }
    
    }
    [/tag]

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Gee, this is the third time you've spammed the board with the same question.

    > I cannot figure out how to write the pseudo code for this function
    Write one English sentence to describe each loop would be a start.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 03-20-2009, 05:22 PM
  2. Coding Guideline ....!!
    By imfeelingfortun in forum Tech Board
    Replies: 8
    Last Post: 10-08-2006, 07:09 AM
  3. Before Coding
    By cyberCLoWn in forum C++ Programming
    Replies: 16
    Last Post: 12-15-2003, 02:26 AM
  4. Coding Contest....
    By Koshare in forum A Brief History of Cprogramming.com
    Replies: 46
    Last Post: 10-14-2001, 04:32 PM