hi there

i was wondering " how to write recursive functions ?"... Is there a general pattern or way to write such function or do we just think and find a way.

I know to how to write simple recursive function but when the question get tough i know we can reduce the complexity using recursion but dont know how to write one