FloodFill Algorithm

Can any one tell me the floodfill algorithm. I would appreciate if u give the code. I need it for height field.
Thank You very much!!

Hi,

It involves the use of a stack (theres a hint) and you can find it in ALMOST ALL 2d graphics textbooks and on the internet. Just do a search on FloodFill