12 2015 档案

摘要:题目描述:(链接)Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the... 阅读全文
posted @ 2015-12-25 22:57 skycore 阅读(215) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are... 阅读全文
posted @ 2015-12-21 10:28 skycore 阅读(135) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each ne... 阅读全文
posted @ 2015-12-20 11:54 skycore 阅读(138) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3... 阅读全文
posted @ 2015-12-20 11:32 skycore 阅读(132) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see b... 阅读全文
posted @ 2015-12-19 15:14 skycore 阅读(128) 评论(0) 推荐(0) 编辑
摘要:题目解析:(链接)Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree... 阅读全文
posted @ 2015-12-19 14:41 skycore 阅读(135) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the n... 阅读全文
posted @ 2015-12-17 22:27 skycore 阅读(158) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)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 阅读(154) 评论(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 阅读(112) 评论(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 阅读(152) 评论(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 阅读(646) 评论(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 阅读(138) 评论(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 阅读(159) 评论(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 阅读(267) 评论(0) 推荐(0) 编辑
摘要:摘要本文介绍一种用于高维空间中的快速最近邻和近似最近邻查找技术——Kd-Tree(Kd树)。Kd-Tree,即K-dimensional tree,是一种高维索引树形数据结构,常用于在大规模的高维数据空间进行最近邻查找(Nearest Neighbor)和近似最近邻查找(Approximate Ne... 阅读全文
posted @ 2015-12-09 12:24 skycore 阅读(316) 评论(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 阅读(170) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The fl... 阅读全文
posted @ 2015-12-05 13:25 skycore 阅读(167) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which ... 阅读全文
posted @ 2015-12-05 13:02 skycore 阅读(138) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: ... 阅读全文
posted @ 2015-12-05 12:48 skycore 阅读(126) 评论(0) 推荐(0) 编辑
摘要:题目解析:(链接)Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the giv... 阅读全文
posted @ 2015-12-02 22:09 skycore 阅读(137) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally ide... 阅读全文
posted @ 2015-12-01 19:36 skycore 阅读(140) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) ... 阅读全文
posted @ 2015-12-01 19:20 skycore 阅读(165) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示