上一页 1 ··· 11 12 13 14 15
摘要: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is a 阅读全文
posted @ 2016-09-10 08:03 Machelsky 阅读(155) 评论(0) 推荐(0)
摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of 阅读全文
posted @ 2016-09-10 07:37 Machelsky 阅读(124) 评论(0) 推荐(0)
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the dept 阅读全文
posted @ 2016-09-10 06:24 Machelsky 阅读(133) 评论(0) 推荐(0)
摘要: 思路:递归。 null也是tree。 null tree (definition) Definition: (1) A tree which is empty. (2) A tree whose leaf nodes all have a null value. https://xlinux.nis 阅读全文
posted @ 2016-09-10 05:09 Machelsky 阅读(126) 评论(0) 推荐(0)
摘要: 思路:纯递归。 阅读全文
posted @ 2016-09-10 04:57 Machelsky 阅读(99) 评论(0) 推荐(0)
摘要: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight). For example, the 32-bit i 阅读全文
posted @ 2016-09-10 03:42 Machelsky 阅读(192) 评论(0) 推荐(0)
摘要: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime comple 阅读全文
posted @ 2016-09-09 13:31 Machelsky 阅读(176) 评论(0) 推荐(0)
摘要: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2016-09-09 13:17 Machelsky 阅读(120) 评论(0) 推荐(0)
摘要: 脆跪了expedia。作为转专业的学生,自己还是有点冒进了。基础不扎实,题目不熟练就上去当炮灰。十月之前好好修炼吧,一刷205道,硬着头皮啃下来的骨头确实不好吃。二刷开始~ 阅读全文
posted @ 2016-09-09 13:05 Machelsky 阅读(148) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15