Salesforce Interview Question

Simple algorithms and finding diagnol elements in a binary tree