摘要:
You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ... 阅读全文
摘要:
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the... 阅读全文
摘要:
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from lea... 阅读全文
摘要:
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given... 阅读全文
摘要:
Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / ... 阅读全文
摘要:
Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit.... 阅读全文