摘要:
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-27 14:50
lilixu
阅读(131)
评论(0)
推荐(0)
摘要:
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For exa 阅读全文
posted @ 2016-04-14 15:23
lilixu
阅读(123)
评论(0)
推荐(0)
摘要:
Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL 阅读全文
posted @ 2016-04-14 15:03
lilixu
阅读(161)
评论(0)
推荐(0)
摘要:
Sort a linked list using insertion sort. 以第一个元素head后面接null为起始数组,然后后面每个node插入排序,然而超时。 评论区的优化:双指针在原链表上插入排序,且只有在该node需要被插入开始处重置开始指针。 阅读全文
posted @ 2016-04-07 18:00
lilixu
阅读(136)
评论(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-07 11:35
lilixu
阅读(111)
评论(0)
推荐(0)
摘要:
Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the 阅读全文
posted @ 2016-04-06 17:11
lilixu
阅读(130)
评论(0)
推荐(0)
浙公网安备 33010602011771号