Snowflake interview question

Tree based question in both the interviews