Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Function Name: marinaraTrench Inputs: 1. (double) An NxM array of depths Outputs: 1. 2. (double) The shallowest point of the trench (double) The deepest point

image text in transcribed

Function Name: marinaraTrench Inputs: 1. (double) An NxM array of depths Outputs: 1. 2. (double) The shallowest point of the trench (double) The deepest point of the trench Banned Functions: min(), max(), sort() Background: As we know, pirates roma the seas. "ba-dum-tsss Function Description: Given an array of trench depths, find and return both the shallowest and the deepest points of the trench, which will be the minimum and maximum values of the array, respectively. Trench depths will be represented by doubles. Example: trench [ 3.5, 6.5, 26.3, 90.3, 62.2 11.4, 14.5, 25.6, 82.1, 70.9 18.3, 24.2, 27.2, 100.4, 108.2 12.3, 3.2, 36.2, 92.5, 34.2 ]; [shallow, deep] -marinaraTrench (trench); shallow>3.2 deep 108.2 Notes: You only need to iterate through the array once. The array will have at least one element in it

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Support For Data Mining Applications Discovering Knowledge With Inductive Queries Lnai 2682

Authors: Rosa Meo ,Pier L. Lanzi ,Mika Klemettinen

2004th Edition

3540224793, 978-3540224792

More Books

Students also viewed these Databases questions

Question

6. Explain the power of labels.

Answered: 1 week ago

Question

10. Discuss the complexities of language policies.

Answered: 1 week ago