摘要: Description Given an array of non negative integers, half of the integers in A are odd, and half of the integers are even. Sort the array so that when 阅读全文
posted @ 2019-01-23 22:30 arcsinW 阅读(252) 评论(0) 推荐(0) 编辑
摘要: Description A binary tree is univalued if every node in the tree has the same value. Return true if and only if the given tree is univalued. Example 1 阅读全文
posted @ 2019-01-22 21:39 arcsinW 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Description In a array of size , there are unique elements, and exactly one of these elements is repeated N times. Return the element repeated times. 阅读全文
posted @ 2019-01-21 16:17 arcsinW 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Description Given an array of integers sorted in non decreasing order, return an array of the squares of each number, also in sorted non decreasing or 阅读全文
posted @ 2019-01-21 16:15 arcsinW 阅读(588) 评论(0) 推荐(0) 编辑
摘要: Description Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which m 阅读全文
posted @ 2019-01-21 16:13 arcsinW 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Description Given the root node of a binary search tree (BST) and a value to be inserted into the tree, insert the value into the BST. Return the root 阅读全文
posted @ 2019-01-18 19:43 arcsinW 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Description The Fibonacci numbers , commonly denoted form a sequence, called the Fibonacci sequence , such that each number is the sum of the two prec 阅读全文
posted @ 2019-01-17 20:15 arcsinW 阅读(393) 评论(0) 推荐(0) 编辑
摘要: Description Given the node of a binary search tree, return the sum of values of all nodes with value between and (inclusive). The binary search tree i 阅读全文
posted @ 2019-01-16 21:54 arcsinW 阅读(276) 评论(0) 推荐(0) 编辑
摘要: Description Every email consists of a local name and a domain name, separated by the @ sign. For example, in alice@leetcode.com, alice is the local na 阅读全文
posted @ 2018-12-18 17:17 arcsinW 阅读(249) 评论(0) 推荐(0) 编辑
摘要: Description Given an array A of non negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A 阅读全文
posted @ 2018-10-16 10:04 arcsinW 阅读(254) 评论(0) 推荐(0) 编辑
摘要: Description Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', and in any positions ) so that the res 阅读全文
posted @ 2018-10-14 23:55 arcsinW 阅读(376) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function 阅读全文
posted @ 2018-09-14 20:17 arcsinW 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Given a non empty array of digits representing a non negative integer, plus one to the integer. The digits are stored such that the most significant d 阅读全文
posted @ 2018-09-02 17:19 arcsinW 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Given an array nums and a value val, remove all instances of that value in place and return the new length. Do not allocate extra space for another ar 阅读全文
posted @ 2018-08-25 10:39 arcsinW 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Given a 32 bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: Note: Assume we are dealing with an environment which co 阅读全文
posted @ 2018-08-21 13:25 arcsinW 阅读(131) 评论(0) 推荐(0) 编辑