Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.
Calling next() will return the next smallest number in the BST.
next()
Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).
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 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…
There are 2 ways of creating your own Java8 docker file depending upon the distribution.
# Add the base Image…
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.
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
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.
label
neighbors
OJ’s undirected graph serialization:Nodes are labeled uniquely.We use # as a separator for each node, and , as a separator for…
#
,
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.
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.