its base class has a function with keyword virtual and assigned value 0.
Virtual function is written with keyword virtual in baseclass and is further overrideden in subclass having same name,return type and signatures..it is basically used to hide base class method from superclass.
it was at the end of the interview which is unusual because you don't even have time to talk to them and see what they want you to implement when I asked if they want it recursively done and the type of data structure they want me to use, they said oh we are out of time !! what kind of interviewer would ask white boarding questions 10 minutes towards the end of the interview ! I explained verbally how I would go about implementing it.