0
Search for a number in an Array of integers of size ‘n’
Java
4 ответов
+ 4
Java and Javascript are different languages.
Use a web search for questions like this.
+ 2
Traverse the array. It's the simplest method. In Java, it is something like the below snippet
for(int element:array)
{
if(element==element_to_find)
{
//You've found your element, you can exit the for loop here
}
}
The variable names are intuitive and correspond to the corresponding variables
+ 1
I need the steps of program