Question: You are given a stack of 100 cards. On each card is written a positive number between 1 and 100. a) Define an algorithm

You are given a stack of 100 cards. On each card is 

You are given a stack of 100 cards. On each card is written a positive number between 1 and 100. a) Define an algorithm that you would use to find the largest number in the stack. Make sure that your algorithm is clear and unambiguous. Identify any selection or repetition in it. b) Represent the algorithm using pseudocode. The cards in the stack would look somewhat like the following: 1 27 5 n The actual numbers written on the cards are not important for your algorithm. What is important is that they are equal or greater than 1, no number is repeated, and the cards are not sorted in any way.

Step by Step Solution

3.38 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Pseudocode of an Algorithm function findLargestNumbercards largest cards0 Initialize largest with th... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!