2016年3月19日

摘要: struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: void reorderList(ListNode* head) { if(head == nullptr) return; int size = 0; ... 阅读全文
posted @ 2016-03-19 07:14 做个不善的人 阅读(207) 评论(0) 推荐(0) 编辑
 

2016年3月16日

摘要: struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* rotateRight(ListNode* head, int k) { int level = -1;... 阅读全文
posted @ 2016-03-16 08:33 做个不善的人 阅读(199) 评论(0) 推荐(0) 编辑
 
摘要: DFS 阅读全文
posted @ 2016-03-16 01:13 做个不善的人 阅读(189) 评论(0) 推荐(0) 编辑
 

2014年12月31日

摘要: 在Windows Phone8.1之前,Windows Phone应用是基于Silverlight的,这些代码也不能在Windows上运行,从Windows Phone8.1开始,开发者多了一个选择,就是可以开发Univeral的应用,也就是一份代码,既可以在Windows上运行,又可以在Windo... 阅读全文
posted @ 2014-12-31 04:45 做个不善的人 阅读(339) 评论(0) 推荐(0) 编辑
 

2014年12月28日

摘要: Form辅助方法Form最重要的属性就是action和method,action指明form中的数据被提交到哪里,method指明用什么方法,默认为GET,下面是一个简单的例子: 如果使用ASP.Net MVC , Home/Search往往表示HomeControll... 阅读全文
posted @ 2014-12-28 13:19 做个不善的人 阅读(541) 评论(0) 推荐(1) 编辑
 

2014年11月20日

摘要: NSRulerMarker 有个imageOrigin是描述Marker中image的位置的:在horizontal的ruler中,imageOrigin的x坐标是跟marker的location进行align的,如果imageOrigin的x坐标是0, 那么image的左边界跟marker位置一样... 阅读全文
posted @ 2014-11-20 06:01 做个不善的人 阅读(522) 评论(0) 推荐(0) 编辑
 

2014年9月3日

摘要: given a string ,return the longest substring that contains at most twocharacters.extern "C" char *SubStringWithAtMost2Chars(char * pStr, int len){ ... 阅读全文
posted @ 2014-09-03 12:34 做个不善的人 阅读(216) 评论(0) 推荐(0) 编辑
 

2014年8月21日

摘要: 《编程之美》里的一个题目:能否快速找出一个数组中的两个数字,让这两个数字之和等于一个给定的值,假设这个数组中肯定存在至少一组符合要求的解。 LeetCode的题目: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum ... 阅读全文
posted @ 2014-08-21 13:16 做个不善的人 阅读(796) 评论(0) 推荐(0) 编辑
 

2014年8月20日

摘要: 问题Given an input string, reverse the string word by word.For example, Given s = "the sky is blue", return "blue is sky the".面试时我应该至少问的问题What constitut... 阅读全文
posted @ 2014-08-20 13:30 做个不善的人 阅读(1144) 评论(0) 推荐(0) 编辑
 

2014年8月13日

摘要: 其实不是都在考我们的算法设计,有的时候算法简单,但是coding却可能不那么简单,比如下面这道题目:题:写一个把字符串的IP地址变成32位整数的函数,要求考察程序健壮性。这题初看起来一点都不难,但是真写起来,要没错误还是有点难度的。 阅读全文
posted @ 2014-08-13 13:26 做个不善的人 阅读(505) 评论(0) 推荐(0) 编辑