₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,733 members, 8,513,430 topics. Date: Thursday, 05 November 2026 at 01:35 AM

Toggle theme

Help With This Assignment Please.. - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › Help With This Assignment Please.. (1112 Views)

1 Reply

Help With This Assignment Please.. by kazyzy(op): 10:02am On Jun 18, 2018
Programmers in the house, please help with the following questions:
1. Write an algorithm that finds the middle, or median, value of three distinct integers. The input for this algorithm falls into six groups; describe them. What is the best case for your algorithm? What is the worst case? What is the average case? (If the best and worst cases are the same, rewrite your algorithm with simple conditionals and without temporary variables so the best case is better than the worst case.)
2. Write an algorithm that determines if four integers are distinct. Depending on your viewpoint, the input for this algorithm can be divided into classes based on the structure of your algorithm or the structure of the problem. Describe how one of these two class divisions would be set up. Using your classes, what is the best case for your algorithm? What is the worst case? What is the average case? (If the best and worst cases are the same, rewrite your algorithm with simple conditionals and without temporary variables so the best case is better than the worst case.)
3. Write an algorithm that determines, given a list of numbers and the average or mean of those numbers, if there are more numbers above the average than below. Describe the groups that the input would fall into for this algorithm. What is the best case for your algorithm? What is the worst case? What is the average case? (If the best and worst cases are the same, rewrite your algorithm so it stops as soon as it knows the answer, making the best case better than the worst case.)
1 Reply

Hi Guys, Please Help With This Assignment • Help With This Python Programming Assignment Please • Please Help Me With This Assignment • 2 • 3 • 4

Web Guru • Please Help Me Solve This Error Message On My Wordpress Site • UIX Design