← Salesforce questions

Insert element at bottom of stack and find LCA in binary tree

Filed under Salesforce

Write programs to: 1) insert an element at the bottom of a given stack, and 2) find the lowest common ancestor (LCA) of two nodes in a binary tree.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Salesforce questions

Collected from public candidate posts and coding forums. Updated Nov 2026.