Adding find shifted index in sorted and shifted array algorithm