ZS Associates interview question

Question related to interface, Binary Trees, Oops, Sql CTE