上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 27 下一页
摘要: dijkstra: floyd: prim: kruskal: 阅读全文
posted @ 2016-11-04 16:18 wxquare 阅读(314) 评论(0) 推荐(0) 编辑
摘要: Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there will be 阅读全文
posted @ 2016-11-04 16:13 wxquare 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled wit 阅读全文
posted @ 2016-11-04 16:11 wxquare 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions. 阅读全文
posted @ 2016-11-04 16:09 wxquare 阅读(186) 评论(0) 推荐(0) 编辑
摘要: The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all 阅读全文
posted @ 2016-11-04 16:07 wxquare 阅读(241) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2. Your algorithm s 阅读全文
posted @ 2016-10-13 10:02 wxquare 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linear time/space. Return 阅读全文
posted @ 2016-10-12 10:29 wxquare 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2, 阅读全文
posted @ 2016-10-11 10:36 wxquare 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose a 阅读全文
posted @ 2016-10-10 21:02 wxquare 阅读(71) 评论(0) 推荐(0) 编辑
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. 阅读全文
posted @ 2016-10-10 21:01 wxquare 阅读(117) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 27 下一页