Question: * * contains * * Purpose: determines whether the values in looking For are strictly * contained in looking In in the same order *

*

* contains

*

* Purpose: determines whether the values in looking For are strictly

* contained in looking In in the same order

*

* Parameters: int [] looking For - array of integers being looked for

* int[] lookingIn - array of integers being looked in

*

* Returns: boolean - true if lookingFor is in lookingIn, false otherwise

*

*/

// TODO: add the method implementation

//[1,2 3 4 5]

// 768793

//false

// 12345

// 2349576

// true

// 123568

// 233890

// false

remember they have to be in the same order and be a subset to another

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The provided code correctly implements the contains function to determine if an array lookingfor is strictly contained within another array lookingin Heres a breakdown of how it works Explanation Func... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!