自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 find Minimum and Maximum in Rotated Sorted Arrray

int findMin(vector& nums) { int start = 0; int end = nums.size() - 1; while(start + 1 < end){ int mid = start + (end - start)/2; if(nums[mid] < nums[end

2016-01-26 05:00:42 208

原创 iOS学习笔记5-UIView

常见的iphone 尺寸:     iphone 3gs 3.5寸: 320 x 480 @1x     iphone 4 & 4s 3.5寸 320 x 480 @2x 640 X 960     iphone 5 5c 5s 320X 568 @2x 640 X 1136     iphone 6 4.7寸  375x 667 @2x 750x1344     ipho

2016-01-19 03:01:09 237

原创 Subtree

You have two every large binary trees: T1, with millions of nodes, andT2, with hundreds of nodes. Create an algorithm to decide ifT2 is a subtree of T1.1. 利用BFS 搜索到第一个node 与T2 的root相同,然后进行判断这两

2016-01-18 04:33:40 274

原创 Partition Array by Odd and Even

Partition an integers array into odd number first and even number second.ExampleGiven [1, 2, 3, 4], return[1, 3, 2, 4]ChallengeDo it in-place.非常典型的two pointer: 一个左指针,一个右指针, 当left 指

2016-01-18 03:51:28 195

原创 Count 1 in Binary

Count how many 1 in binary representation of a 32-bit integer.ExampleGiven 32, return1Given 5, return2Given 1023, return9ChallengeIf the integer is n bits with m 1 bits. Can you do

2016-01-18 03:25:16 193

原创 iOS 学习笔记4-NSDictionary 和 NSMutableDictionary

/* 字典: 存储的内存不是连续的, key-value 对应, */// 创建方法: // 1.不常用,只有一组k-v NSDictionary* dict1 = [NSDictionary dictionaryWithObject:@"1" forKey:@"a"]; NSLog

2016-01-17 23:31:08 278

原创 iOS学习笔记3-NSArray 和 NSMutableArray

1. NSArray// OC 的数组相比C++, java的数组要更为强大,可以存储不同类型的对象, 并且OC只能存储对象 NSArray* array1 = [[NSArray alloc] initWithObjects:@"1", @"2", @"3", @"4", nil];// nil 不可少,用来判断结束 //1. 数组长度 int

2016-01-16 04:21:29 256

原创 iOS学习笔记2-NSString

主要分为两个部分1. NSString 2. NSMutableString一. NSString char* s = "Hello"; NSString* str = @"Hello";// OC, C 字符串转换 // C->OC NSString* str1 = [NSString stringWithUTF8Strin

2016-01-16 03:13:56 247

原创 iOS学习笔记1- OC的类的定义和继承

1. 关于成员变量访问修饰符@interface MyClass : NSObject{ // 默认-受保护 // public, 类内类外都可以访问,并且可以继承 @public int _classInt; // 私有, 类内可以使用, 类外无法调用, 并且不可以被继承 @private // 受保护, 类内

2016-01-14 06:19:18 286

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除