Menu
support@nursinghomework.org
+1 714-215-3097

(Solved) : Write Recursive Algorithm Finds Largest Integer Array Integers Teacher Gave Us Clue T Get Q35608051

Write a recursive algorithm that finds the largest integer in an array of integers.Our teacher gave us this clue…but I can’t get it to work. Help please.public static int findLargest(int[] array, int first, int last){ if (first == last) { return array[first]; } int mid = (first + last) / 2; int left = findLargest(first, mid); int right = findLargest(mid + 1, last); if (left < right) { return right; } return left;

Leave a Reply

Your email address will not be published. Required fields are marked *