Cracking Ripple's Software Engineer Interview: Tackling Binary Tree Challenges

ripple | Software Engineer | Interview Experience

Interview Date: Not specified
Result: Rejected
Difficulty: Not specified

Interview Process

The interview consisted of a technical coding assessment focused on binary tree problems. The candidate was asked to find the path between two given nodes in a binary tree. The interview involved explaining the approach to the problem and discussing the logic behind the solution.

Technical Questions

  1. Lowest Common Ancestor of a Binary Tree (Tree, Depth-First Search, Binary Tree)
    • Given a binary tree, find the path between two nodes.
    • Example Input:
      1
      
    /
    2 3
    a = 2, b = 3
    - Example Output:  
    
    2,1,3
    
    - Another example:
    - Example Input:  
    
    1
    /
    2 3
    /
    6 5
    /
    7 8
    a = 3, b = 5
    - Example Output:  
    
    3,1,2,5
    
    

Tips & Insights

The candidate’s approach involved finding the Lowest Common Ancestor (LCA) and then backtracking the path to concatenate the results. The interviewer followed up with questions regarding handling duplicate values and differences in time complexity when dealing with a binary search tree (BST).