上一页 1 2 3 4 5 6 ··· 12 下一页
摘要: 问题描述Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem ... 阅读全文
posted @ 2015-08-18 11:32 Chapter 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 问题描述Given two words (beginWordandendWord), and a dictionary, find the length of shortest transformation sequence frombeginWordtoendWord, such that:Onl... 阅读全文
posted @ 2015-08-17 20:27 Chapter 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Problem I:判断数字是不是回文字符串形式Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative int... 阅读全文
posted @ 2015-08-16 13:02 Chapter 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 记录周围伙伴们面试Google遇到的问题和大致解决思路。【算法】ARRAY | 数组1.给定一个有序数组,和两个值表示区间的开始和结束,找出数组中不在这个区间里的元素比如[1,2,4] 1,10输出[3,5-10]2.给两个集合,找出两个集合中的不一样的部分[1,2,2,2],[1,2,3]输出[2... 阅读全文
posted @ 2015-08-14 09:47 Chapter 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 问题描述Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled ... 阅读全文
posted @ 2015-08-13 19:16 Chapter 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 双层桶划分双层桶划分----其实本质上还是分而治之的思想,重在“分”的技巧上!适用范围:第k大,中位数,不重复或重复的数字基本原理及要点:因为元素范围很大,不能利用直接寻址表,所以通过多次划分,逐步确定范围,然后最后在一个可以接受的范围内进行。可以通过多次缩小,双层只是一个例子。扩展:问题实例:13... 阅读全文
posted @ 2015-08-12 15:41 Chapter 阅读(203) 评论(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 contains on... 阅读全文
posted @ 2015-08-12 10:43 Chapter 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Problem I: Lowest Common Ancestor of a Binary Search TreeGiven a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in... 阅读全文
posted @ 2015-08-12 10:37 Chapter 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 问题描述Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.解决思路1.定义Line类{slope; intercept; isVertical; isHor... 阅读全文
posted @ 2015-08-11 20:56 Chapter 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 问题描述You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a conca... 阅读全文
posted @ 2015-08-11 19:31 Chapter 阅读(150) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 12 下一页