HashedIn by Deloitte interview question

Root to leaf path sum equal to a given number https://www-geeksforgeeks-