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)
 
摘要: Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your a 阅读全文
posted @ 2016-04-22 10:42 烁宝宝 阅读(152) 评论(0) 推荐(0)