Can you please help me to debug my code

i don’t know what to return in the given function.i refer the article given on GFG but in that article the function return int data type.But in the given the function return Node thats why i am not getting it.