Changes

27 bytes removed ,  07:54, 30 January 2009
Line 80: Line 80:  
Written in prose but much closer to the high-level language of a computer program, the following is the more formal coding of the algorithm in pseudocode or pidgin code:
 
Written in prose but much closer to the high-level language of a computer program, the following is the more formal coding of the algorithm in pseudocode or pidgin code:
   −
  Input: A non-empty list of numbers ''L''.
+
Input: A non-empty list of numbers ''L''.
  Output: The ''largest'' number in the list ''L''.
+
Output: The ''largest'' number in the list ''L''.
 
   
 
   
  ''largest'' ← ''L''<sub>0</sub>
+
''largest'' ← ''L''<sub>0</sub>
  '''for each''' ''item'' '''in''' the list ''L<sub>≥1</sub>'', '''do'''
+
'''for each''' ''item'' '''in''' the list ''L<sub>≥1</sub>'', '''do'''
    '''if''' the ''item'' > ''largest'', '''then'''
+
'''if''' the ''item'' > ''largest'', '''then'''
      ''largest'' ← the ''item''
+
''largest'' ← the ''item''
  '''return''' ''largest''
+
'''return''' ''largest''
    
=== Algorithmic analysis ===
 
=== Algorithmic analysis ===