上一页 1 ··· 6 7 8 9 10 11 下一页
摘要: Isomorphic StringsGiven two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All... 阅读全文
posted @ 2015-08-19 14:46 Sean_le 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Contains Duplicate IIGiven an array of integers and an integerk, find out whether there are two distinct indicesiandjin the array such thatnums[i] = n... 阅读全文
posted @ 2015-08-19 14:10 Sean_le 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Valid SudokuDetermine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are ... 阅读全文
posted @ 2015-08-19 13:54 Sean_le 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Valid AnagramGiven two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", return true.s= "rat",t=... 阅读全文
posted @ 2015-08-19 13:23 Sean_le 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Contains DuplicateGiven an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at leas... 阅读全文
posted @ 2015-08-19 13:00 Sean_le 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Single NumberGiven an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runti... 阅读全文
posted @ 2015-08-18 21:58 Sean_le 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Valid Numberalidate 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 p... 阅读全文
posted @ 2015-08-18 20:05 Sean_le 阅读(146) 评论(0) 推荐(0) 编辑
摘要: String to Integer (atoi)Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, plea... 阅读全文
posted @ 2015-08-18 18:55 Sean_le 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Max Points on a LineGivennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.对点遍历,找到对每个点共线的最大点数,所有点的最大值即是全局最大值... 阅读全文
posted @ 2015-08-18 16:44 Sean_le 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Add DigitsGiven a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is... 阅读全文
posted @ 2015-08-17 16:59 Sean_le 阅读(166) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 下一页