个人博客:https://luxialan.com

摘要: 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-02-04 22:05 luxialan 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 3SumGiven an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:El... 阅读全文
posted @ 2015-02-04 10:51 luxialan 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Two SumGiven an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the... 阅读全文
posted @ 2015-02-04 10:05 luxialan 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4... 阅读全文
posted @ 2015-02-04 09:54 luxialan 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Median of Two Sorted ArraysThere are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run... 阅读全文
posted @ 2015-02-04 09:05 luxialan 阅读(125) 评论(0) 推荐(0) 编辑