Pseudo Coding

This is a discussion on Pseudo Coding within the C++ Programming forums, part of the General Programming Boards category; [tag] Code: I cannot figure out how to write the pseudo code for this function, I need help. void Insertion( ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,544
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 01: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21