The simplest solution would be to check every element one by one and compare it with k (a so-called linear search). This approach works in O(n) , but doesn't utilize the fact that the array is sorted.Binary search of the value $7$ in an array. The image ...
Minimum element in a sorted and rotated array - GFG Preorder Traversal - GFG Row with max 1s - GFG Value equal to index value - GFG add-two-numbers adding-spaces-to-a-string arithmetic-subarrays array-nesting array-partition-i balance-a-binary-search-tree balanced-binary-tree best-time-...