Is it possible to count the consecutive same elements in a array using binary search? If it is possible then please guide regarding it.