06 2015 档案
59 N Queens
摘要:研究了一夜,各种bug。看到了大神的代码,简洁明了。学习了。class Solution { public: void printQueen(vector &A,int n,vector> &result){ vector r; for(int i=0;iA,... 阅读全文
posted @ 2015-06-08 05:40 88123 阅读(184) 评论(0) 推荐(0)
26 Remove Duplicates from Sorted Array
摘要: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 阅读(137) 评论(0) 推荐(0)
27 Remove Element 数组版
摘要:用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 阅读(122) 评论(0) 推荐(0)
27 Remove Element
摘要:这种渣题都调了两次,还是欠练啊。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 阅读(144) 评论(0) 推荐(0)
168 Excel Sheet Column Title
摘要: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 阅读(124) 评论(0) 推荐(0)