Given a binary tree, return the inorder traversal of its nodes’ values.
For example:Given binary tree {1,#,2,3},
{1,#,2,3}
1 \ 2 / 3
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
Note:You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional elements from…
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists, begin to intersect at node c1.
Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space?
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [−2,1,−3,4,−1,2,1,−5,4],the contiguous subarray [4,−1,2,1] has the largest sum = 6.