摘要: 题目描述:(链接)Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique B... 阅读全文
posted @ 2015-12-11 22:14 skycore 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1 -(BOOL)isValidateEmail:(NSString *)email {2 NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; 3 NSPredicate *email... 阅读全文
posted @ 2015-12-11 19:17 skycore 阅读(204) 评论(0) 推荐(0) 编辑
摘要: [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] 阅读全文
posted @ 2015-12-11 19:13 skycore 阅读(644) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given inorder and postorder traversal of a tree, construct the binary tree.解题思路: 1 /** 2 * Definition for a binary tree node. 3 * struct Tr... 阅读全文
posted @ 2015-12-11 10:30 skycore 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given preorder and inorder traversal of a tree, construct the binary tree.解题思路: 1 /** 2 * Definition for a binary tree node. 3 * struct Tre... 阅读全文
posted @ 2015-12-11 10:03 skycore 阅读(156) 评论(0) 推荐(0) 编辑