上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: 题目描述:(链接)Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.解题思路: 1 /** 2 * Definition for ... 阅读全文
posted @ 2015-12-17 21:38 skycore 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given an array where elements are sorted in ascending order, convert it to a height balanced BST.解题思路: 1 /** 2 * Definition for a binary tre... 阅读全文
posted @ 2015-12-17 19:32 skycore 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)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) 编辑
摘要: From :http://www.cnblogs.com/heaad/archive/2010/12/20/1911614.html优化算法入门系列文章目录(更新中): 1.模拟退火算法 2.遗传算法一. 爬山算法 ( Hill Climbing ) 介绍模拟退火前,先介绍爬山算法。爬山算法是一... 阅读全文
posted @ 2015-12-10 15:05 skycore 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 摘要本文介绍一种用于高维空间中的快速最近邻和近似最近邻查找技术——Kd-Tree(Kd树)。Kd-Tree,即K-dimensional tree,是一种高维索引树形数据结构,常用于在大规模的高维数据空间进行最近邻查找(Nearest Neighbor)和近似最近邻查找(Approximate Ne... 阅读全文
posted @ 2015-12-09 12:24 skycore 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 题目解析:(链接)Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contai... 阅读全文
posted @ 2015-12-07 10:33 skycore 阅读(169) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页