上一页 1 ··· 5 6 7 8 9 10 11 下一页

2016年4月27日

摘要: Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. For example, given n = 12, 阅读全文
posted @ 2016-04-27 15:49 烁宝宝 阅读(181) 评论(0) 推荐(0)

2016年4月26日

摘要: For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible roote 阅读全文
posted @ 2016-04-26 15:30 烁宝宝 阅读(158) 评论(0) 推荐(0)
 
摘要: There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every 阅读全文
posted @ 2016-04-26 13:13 烁宝宝 阅读(238) 评论(0) 推荐(0)

2016年4月25日

摘要: One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, 阅读全文
posted @ 2016-04-25 15:16 烁宝宝 阅读(162) 评论(0) 推荐(0)

2016年4月22日

摘要: Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function should: Your algorithm 阅读全文
posted @ 2016-04-22 15:25 烁宝宝 阅读(161) 评论(0) 推荐(0)
 
摘要: Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r 阅读全文
posted @ 2016-04-22 14:36 烁宝宝 阅读(149) 评论(0) 推荐(0)
 
摘要: Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 代码如下: 方法一:(java) 方法二:(c++) 阅读全文
posted @ 2016-04-22 13:56 烁宝宝 阅读(160) 评论(0) 推荐(0)
 
摘要: Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro 阅读全文
posted @ 2016-04-22 13:24 烁宝宝 阅读(242) 评论(0) 推荐(0)
 
摘要: Given a linked list, remove the nth node from the end of list and return its head. For example, 阅读全文
posted @ 2016-04-22 11:15 烁宝宝 阅读(128) 评论(0) 推荐(0)
 
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 代码如下: 阅读全文
posted @ 2016-04-22 11:06 烁宝宝 阅读(146) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 下一页