Find number in a array, where after sometime array is decreasing.

Find number in a array, where after sometime array is decreasing
if element present in array return"exist" else "not exist"
Example:
array- [1,3,5,8,9,10,6,5,4,3,3,2,1,0];
find 4
time completely better than O(n)

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation