-
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:You may assume that duplicates do not exist i...
-
12345678910111213141516171819202122232425262728293031323334353637383940414243public class GuessNumberHigherorLowerII { ...
-
12345678910111213141516171819202122232425262728293031323334import java.util.Arrays;import java.util.HashMap;import java.util....
-
Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to lef...
-
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667...
-
Say you have an array for which the ithelement is the price of a given stock on day i.
Design an algorithm to find the maximu...
-
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667...
-
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667...
-
123456789101112131415161718import utils.TreeNode;import java.util.ArrayList;public class KthSmallestElementinaBST { p...
-
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859import utils.Lis...