Pass an int array and an int and do a search of the second parameter in the first, and return true/false.





Test cases

Test cases Expected Result
searchElement({33,44,21,98,27,94},21) true OK
searchElement({1232,432,546,980,984},980) true OK
searchElement({3,4,9,87,29},2) false OK

Java solution:

Javascript solution




About the author

Bushan Sirgur

Well, I am Bushan Sirgur from Banglore, India. Currently, I am working as a Software Developer in a Service Base Company. I am interested in JAVA/J2EE, Angular 2, JavaScript, jQuery, MongoDB.

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *