摘要: 1 class Solution { 2 public: 3 int singleNumber(int A[], int n) { 4 int i,j; 5 for(i=0; i<n; i++) 6 { 7 for(j... 阅读全文
posted @ 2014-06-09 23:12 Marrybe 阅读(284) 评论(0) 推荐(0) 编辑
摘要: There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi... 阅读全文
posted @ 2014-06-09 21:49 Marrybe 阅读(170) 评论(0) 推荐(0) 编辑
摘要: For example,Given{1,2,3,4}, reorder it to{1,4,2,3}. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * Li... 阅读全文
posted @ 2014-06-09 15:25 Marrybe 阅读(732) 评论(0) 推荐(0) 编辑
摘要: 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), ne... 阅读全文
posted @ 2014-06-09 15:20 Marrybe 阅读(154) 评论(0) 推荐(0) 编辑