Skip to content
TutorialCup
  • Home
  • Tutorials
    • C
    • C++
    • DBMS
    • Java
    • Python
    • SQL
    • Testing
    • GitHub
    • Spring Boot
    • R
    • JavaScript
  • Interviews
    • Technical Interview Questions
    • Interview Questions

TutorialCup

  • Home
  • Tutorials
    • C
    • C++
    • DBMS
    • Java
    • Python
    • SQL
    • Testing
    • GitHub
    • Spring Boot
    • R
    • JavaScript
  • Interviews
    • Technical Interview Questions
    • Interview Questions

Lowest Common Ancestor

Given the root of a binary tree and two nodes n1 and n2, find the LCA(Lowest Common Ancestor) of the nodes. Example What is Lowest Common Ancestor(LCA)? The ancestors of a node n are the nodes present in the path between root and node. Consider the binary tree shown in …

Read moreLowest Common Ancestor

Categories Tree Interview Questions Tags Adobe, Amazon, Apple, Bloomberg, Facebook, Google, LinkedIn, Medium, Microsoft, Oracle, Pony.ai, Tree, Zillow

Check if Two given Matrices are Identical

Problem Statement Given two matrices, we will write a function to check whether the two matrices are identical or not. That is, if all the elements in the respective positions of the two matrices are the same, then we say that they are identical. Input Format The first line containing …

Read moreCheck if Two given Matrices are Identical

Categories Matrix Interview Questions Tags Affirm, Ameyo, Array, DiDi, Easy, Matrix, Pony.ai, School Programming

Search




© TutorialCup 2021 | Feeds | Privacy Policy | Terms | Contact Us | Linkedin | About Us
Scroll back to top