LeetCode Search Insert Position DescriptionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in th 7月 7 2015 #leetcode
LeetCode Power Of Two DescriptionGiven an integer, write a function to determine if it is a power of two. The original problem is here. The original code is here. 7月 7 2015 #leetcode
LeetCode Rotate List DescriptionGiven a list, rotate the list to the right by k places, where k is non-negative. For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL. Th 7月 2 2015 #leetcode
LeetCode Basic Calculator2 DescriptionImplement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, -, *, / operators and empty spaces . The integer division 7月 2 2015 #leetcode
LeetCode Count And Say DescriptionThe count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, … 1 is read off as “one 1” or 11.11 is read off as “two 1s” or 21.21 is read off as “one 7月 1 2015 #leetcode
LeetCode Reorder List DescriptionGiven a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes’ values. For example,Given {1,2,3,4}, reorder it to 6月 30 2015 #leetcode
LeetCode Binary Tree Level Order Traversal2 DescriptionGiven a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root). For example:Given binary tree {3,9,20,#,#,1 6月 30 2015 #leetcode
LeetCode Binary Tree Level Order Traversal DescriptionGiven a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level). For example:Given binary tree {3,9,20,#,#,15,7}, 3 / 9 20 / 6月 30 2015 #leetcode
LeetCode Binary Tree Preorder Traversal DescriptionGiven a binary tree, return the preorder traversal of its nodes’ values. For example:Given binary tree {1,#,2,3}, 1 2 / 3return [1,2,3]. The original problem is here. The o 6月 29 2015 #leetcode
LeetCode Basic Calculator DescriptionImplement a basic calculator to evaluate a simple expression string. The expression string may contain open ( and closing parentheses ), the plus + or minus sign -, non-negative integers an 6月 28 2015 #leetcode