摘要:
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set toNULL.Initially, all next pointers are set toNULL.N... 阅读全文
posted @ 2013-10-16 16:56
昱铭
阅读(152)
评论(0)
推荐(0)
摘要:
Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space to hold additional elements from B. The number of elements initialized in A and B aremandnrespectively. 1 class Solution { 2 public: 3 void merge(int A[], int m, int B[], int n... 阅读全文
posted @ 2013-10-16 16:29
昱铭
阅读(158)
评论(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.====================================================================================One thing to mark. The expression below is wrong,1 cur_node = new NodeList( 阅读全文
posted @ 2013-10-16 16:20
昱铭
阅读(122)
评论(0)
推荐(0)

浙公网安备 33010602011771号