given an unsorted array of n elements, find if element K is present in the array or not
Answers
Answered by
0
Pseudocode:
for(i=0; i < array.length(); i++): //While length of i less than length of array
if(array[i] == 'K'){ //if K is equal to this value in the array
System.out.println("K is present") //Tell us K is present
}
}
This is java!
Similar questions
Science,
5 months ago
English,
5 months ago
Science,
5 months ago
Social Sciences,
10 months ago
English,
10 months ago
Math,
1 year ago
Computer Science,
1 year ago