Computer Science, asked by mlena61, 10 months ago

given an unsorted array of n elements, find if element K is present in the array or not

Answers

Answered by Vultor
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