<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KVGHS6G" height="0" width="0" style="display:none;visibility:hidden"></iframe>

Lacework计算机科学面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(1)
OOD(0)
Algorithm(0)
System Design(0)
高频题(0)
Math(0)
全部(1)
OOD(0)
Algorithm(0)
System Design(0)
高频题(0)
Math(0)
1.Find the Root of a Binary Tree
1. Find the Root of a Binary Tree
Given an input of a vector containing TreeNode pointers, write a function to find the root of the binary tree. The output should be the value of the root node or -1 if the root cannot be determined. Consider various edge cases, such as the presence of multiple trees or a graph structure instead of a tree.