Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 2: Array Here we will create a method to find the smallest value in an array: - We provided the code for you to

image text in transcribed

Part 2: Array Here we will create a method to find the smallest value in an array: - We provided the code for you to start, - Main is done, you need to create minFinder function, First do it with loops - Create another function minFinder_recursive, and use recursive function to create the code to find the min value (you may add more functions/methods as needed) - Write the Pseudocode ( https://en.wikipedia.org/wiki/Pseudocode ) for BOTH functions and do a time analysis in Big-O for both (This step is really important) For the pseudocode, you do not need to be super detailed but in steps by steps tell us how your code works. The Sample Pseudocode will be shown in class Submit it in PDF. import java. util. Random; // this creates random for our program public class App \{ public static int minfinder (int[] arr) \{ int index =; I/YOUR CODE GOES HERE Il you have to do two ways, once with loops, once with Recusive (For recursive you need nore functions or methods, so create them) /lonce you find the minimum value, return the index of it in the array return index; \} public static void main(String[] args) throws Exception \{ int[] myArr = new int[10e]; Random myRand = new Random(); // creating Randon object 11 Range for random to select from int min=5; int max=1669; int indexain=0; for (int i=;i

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

Step: 3

blur-text-image

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions