(a) Suppose you know what k is. Give an algorithm to find the largest number in A.
(b) Suppose you do not know what k is. Give an algorithm to find the largest number in A.
(c) What is the time complexity of your algorithms in (a) and (b)?
Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.
Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!