Cruise Interview Question

Find a connected component in a binary image given a starting index.