TPT
Total:
$0.00
AP Computer Science A Problem 2: Java Array Practice! Find Max and Min
AP Computer Science A Problem 2: Java Array Practice! Find Max and Min
AP Computer Science A Problem 2: Java Array Practice! Find Max and Min
AP Computer Science A Problem 2: Java Array Practice! Find Max and Min
Share

Description

A worksheet that allows students to practice a common AP Computer Science exam question: finding the maximum and minimum values in an array using a linear search. Includes fully coded answer!

Example:

Write methods to find the maximum and minimum values in an array and return the indices at which they occur. If the array length is zero, return -1.

int[] arr = {10, 3, 85, 2, 9, 14, 11};

int index = arrayMax(arr);

System.out.println(“Max value “ + arr[index] + “ found at index “ + index);

>> Element 85 found at index 2

Report this resource to TPT
Reported resources will be reviewed by our team. Report this resource to let us know if this resource violates TPT's content guidelines.

AP Computer Science A Problem 2: Java Array Practice! Find Max and Min

Rated 4.5 out of 5, based on 2 reviews
4.5 (2 ratings)
CompSciGuy
23 Followers
$1.00

Highlights

Digital downloads
Grades icon
Grades
9th - 12th
Answer Key
Included

Description

A worksheet that allows students to practice a common AP Computer Science exam question: finding the maximum and minimum values in an array using a linear search. Includes fully coded answer!

Example:

Write methods to find the maximum and minimum values in an array and return the indices at which they occur. If the array length is zero, return -1.

int[] arr = {10, 3, 85, 2, 9, 14, 11};

int index = arrayMax(arr);

System.out.println(“Max value “ + arr[index] + “ found at index “ + index);

>> Element 85 found at index 2

Report this resource to TPT
Reported resources will be reviewed by our team. Report this resource to let us know if this resource violates TPT's content guidelines.

Reviews

4.5
Rated 4.5 out of 5, based on 2 reviews
2
ratings
All verified TPT purchases
Rated 4 out of 5
December 1, 2020
This was helpful when I was planning for AP review.
OKPhysicsGirl
(TPT Seller)
99 reviews
Rated 5 out of 5
June 4, 2020
Great Resource
viet V.
11,144 reviews

Questions & Answers

Loading
Loading