2015年6月1日
摘要: Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a... 阅读全文
posted @ 2015-06-01 10:05 88123 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 用vector投机取巧了。看网上大神的数组代码。双指针的应用。class Solution {public: int removeElement(int A[], int n, int elem) { // Start typing your C/C++ solution bel... 阅读全文
posted @ 2015-06-01 09:48 88123 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 这种渣题都调了两次,还是欠练啊。class Solution {public: int removeElement(vector& nums, int val) { int i=0; int k=0; int j=nums.size(); ... 阅读全文
posted @ 2015-06-01 06:02 88123 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 ->... 阅读全文
posted @ 2015-06-01 05:42 88123 阅读(117) 评论(0) 推荐(0) 编辑