Question: Java eam.carleton ca/moodle/pluginfile php/2685430/mod resource/content/0/a1.pdf Due Monday, July 16 at 5:30 pm Assignment #1 COMP1006/1406 Summer 2018 Instructions for subanitting will be posted to culearn.
eam.carleton ca/moodle/pluginfile php/2685430/mod resource/content/0/a1.pdf Due Monday, July 16 at 5:30 pm Assignment #1 COMP1006/1406 Summer 2018 Instructions for subanitting will be posted to culearn. In assigment specifications, text appearing like this represents code in a program or things that a user types when running a program. Text that appears like this represents output from your program or methods. 1: Arrays *In the provided MinDistance. java fle, complete the distance method. For a given target value, the method retarns the ninitmal distance between any two instances of the t input array of sumbers ween any two Instances of the target in the The distance between two numbers in the array is defiued to be the number of array cells between them Consider the Sollowing array of mumbers 53 7 23 44 7 3 -13 475 The distance between the two 5's in the array is 12. The distance between the first two 4's in the array is 0. The minimal distance between any two 3's is 1. The minimal distauee between any two T's is 4 pubiie static int aistance(byte target, byte l numbers) / parpose: deternine the ninisal distance betveen asy two instances of target in the nunbers array targes a the nunber ve are looking for nunbers is an array of nunbers Imput put : the nethod returna F6 F8 F9 F10 F11 F12 9 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
