摘要: 将奇数位的数放在一起,将偶数位的放在一起并放在奇数位的后面。 #include <map>#include <iostream>#include <vector>using namespace std; struct ListNode { int val; ListNode *next; ListN 阅读全文
posted @ 2016-02-05 12:09 _TFS 阅读(198) 评论(0) 推荐(0)
摘要: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, give 阅读全文
posted @ 2015-10-11 09:50 _TFS 阅读(195) 评论(0) 推荐(0)
摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle:The minimum path sum from top to bottom is 11 (i.e., 2 + 3 + 5 + 1 = 11). 阅读全文
posted @ 2015-10-10 20:25 _TFS 阅读(163) 评论(0) 推荐(0)