Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Recursive Functions to Handle Arrays and Find Minimum Value, Lecture notes of Computer Programming

Two recursive functions in python: one named 'printarray' that takes an array and its size as arguments and prints the array without returning any value, and another named 'recursiveminimum' that takes an integer array and its size as arguments and returns the smallest element in the array. Both functions use recursion and stop processing when they receive arrays of size zero.

Typology: Lecture notes

2012/2013

Uploaded on 04/27/2013

kid
kid 🇮🇳

4.3

(18)

111 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Question 1 Print an array
Write a recurisive function printArray that takes an array and the size of the
array as arguments and return nothing. The function should stop processing
and return when is receives an array of size zero.
Question 2 Find the minimum value in an array
pf2

Partial preview of the text

Download Recursive Functions to Handle Arrays and Find Minimum Value and more Lecture notes Computer Programming in PDF only on Docsity!

Question 1 Print an array

Write a recurisive function printArray that takes an array and the size of the array as arguments and return nothing. The function should stop processing and return when is receives an array of size zero.

Question 2 Find the minimum value in an array

Write a recurisive function recursiveMinimum that takes an integer array and the array size as arguments and return the smallest element of the array. The function should stop processing and return when it receives an array of 1 element.