Question

Give a flowchart and pseudocode to solve the following problems: a. Read in a series of...

Give a flowchart and pseudocode to solve the following problems:

a. Read in a series of numbers until EOF, and print out the largest found

Explain the efficiency of the algorithm we and give the best and worst-case performance. Explain why your answer is correct.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Psuedo code:

res= Minimum Negative integer value possible
read file
return if find not found
read file until EOL
   store value read in val
   if val > res
       res =val

print res

Running time complexity of this algorithm in worst and best is
O(N) where N is no of integers present in the file

flowchart

Add a comment
Know the answer?
Add Answer to:
Give a flowchart and pseudocode to solve the following problems: a. Read in a series of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT