Given a bitonic array and a target key, find if the key is present in the array. Return its index if found, otherwise return -1.
{
"arr": [
1,
3,
8,
12,
4,
2
],
"key": 4
}4{
"arr": [
5,
10,
20,
15
],
"key": 20
}2{
"arr": [
1,
2,
3,
4,
5
],
"key": 3
}2Sign in to Run Code and Submit