2015年9月29日

摘要: 使用NSTimer的类#import "TBTimerTestObject.h"#import "TBWeakTimerTarget.h"@interface TBTimerTestObject()@property (nonatomic, weak) NSTimer *timer;@end@imp... 阅读全文
posted @ 2015-09-29 17:02 聆听V风声 阅读(454) 评论(0) 推荐(0) 编辑

2015年9月27日

摘要: 1 题目:Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in th... 阅读全文
posted @ 2015-09-27 21:32 聆听V风声 阅读(398) 评论(0) 推荐(0) 编辑
 
摘要: 1 题目:根据给出的数独,全部填出来2 思路:为了做出来,我自己人工做了一遍题目给的数独。思路是看要填的数字横、竖、子是否已经有1-9的数字,有就剔除一个,最后剩下一个的话,就填上。一遍一遍的循环,直到填完为止。后来发现,这个思路只能解决部分数独。还有部分数独是需要回溯的,比如,这个位置只能填3或5... 阅读全文
posted @ 2015-09-27 19:59 聆听V风声 阅读(423) 评论(0) 推荐(0) 编辑
 
摘要: 1 题目Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled w... 阅读全文
posted @ 2015-09-27 19:52 聆听V风声 阅读(105) 评论(0) 推荐(0) 编辑

2015年9月26日

摘要: 1 题目You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?2 思路使用辅助空间比较简单。... 阅读全文
posted @ 2015-09-26 19:51 聆听V风声 阅读(142) 评论(0) 推荐(0) 编辑

2015年9月21日

摘要: 1 题目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted ... 阅读全文
posted @ 2015-09-21 22:31 聆听V风声 阅读(140) 评论(0) 推荐(0) 编辑
 
摘要: 1 题目:Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Update (2014-11-02):T... 阅读全文
posted @ 2015-09-21 21:24 聆听V风声 阅读(155) 评论(0) 推荐(0) 编辑

2015年9月16日

摘要: 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 f... 阅读全文
posted @ 2015-09-16 22:19 聆听V风声 阅读(119) 评论(0) 推荐(0) 编辑
 
摘要: 1 题目:Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen l... 阅读全文
posted @ 2015-09-16 21:32 聆听V风声 阅读(417) 评论(0) 推荐(0) 编辑
 
摘要: 1 题目:目前被墙,看不了。2 思路:比较简单,注意处理边界点就好3 代码: public ListNode swapPairs(ListNode head) { int temp; if(head == null){ return null;... 阅读全文
posted @ 2015-09-16 10:36 聆听V风声 阅读(120) 评论(0) 推荐(0) 编辑