Question: Write an algorithm that outputs the smallest and largest values in the sequence s1, ..., sn Input: s, n Output: small (smallest), large (largest) small_large(s.
Write an algorithm that outputs the smallest and largest values in the sequence s1, ..., sn Input: s, n Output: small (smallest), large (largest) small_large(s. n) {//write your algorithm here} Write an algorithm that reverses the sequence s1, ..., sn. Example: If the sequence is Amy Bruno Elie, The reverse sequence Elie Bruno Amy Input: s, n Output: s (in reverse) reverse (s, n) {//write your algorithm here}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
