Question: In python 3 please Q1. [30] Min-Max recursive algorithm 1) [10] Write a recursive algorithm in pseudocode, Min-Max, for finding both the minimum element and
![In python 3 please Q1. [30] Min-Max recursive algorithm 1) [10]](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f39000a249b_14466f3900040c6a.jpg)
In python 3 please
Q1. [30] Min-Max recursive algorithm 1) [10] Write a recursive algorithm in pseudocode, Min-Max, for finding both the minimum element and the maximum element in an array A of n elements. Your algorithm calls itself only once within the algorithm and should return a pair (a, b) where a is the minimum element and b is the maximum element. Algorithm Min-Max(A, n) Input: an Array A of n elements Output: a pair of (a, b) where a is the minimum element and b is the maximum element. Your algorithm is written here in pseudocode. Ifn=1 return (A[O], [O] 2) [20] Implement your algorithm of Q1.(1) in Python, returning a pair of the maximum and the minimum elements. // file: Q1-2.png Nams - [12, 32, 40, 8, 19, 0, 20, 198, 38) Python 3.74 Shell File Edit Shell Debug Options Window Help Python 3.7.4 (tags/v3.7.4:09359112e, Jul 8 2019, 20:34:20) (MSC v.1916 64 bit (AMD64)) on win32 Type "help", "copyright", "credits" or "license()" for more information. RESTART: C:\Users\Kim OneDrive\Documents\Classes\csei 242\HW1-D * HM 1-2 .py (0, 198) >>> Q2. Draw the binary search tree of height 3 with the keys 12, 38, 44, 52
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
