in reply to Index finding problem

Your description is almost incomprehensible. Is the following what you actually meant?:

Given an array A, an index i, and a value v, find the smallest index j such that j > i and A[j] == v

Dave.