#11 - Search element in the array
Example 1
Input:
arr = [12, 5, 8, 23, 17, 9]
target = 23
Output:
Element found at index 3
Example 2
Input:
arr = [12, 5, 8, 23, 17, 9]
target = 100
Output:
Element not found
Example 3
Input:
arr = [12, 5, 8, 5, 17, 9]
target = 5
Output:
Element found at index 1
Last updated