上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 43 下一页

2015年10月6日

37. Sudoku Solver (Array;Back-Track)

摘要: 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 @ 2015-10-06 12:46 joannae 阅读(175) 评论(0) 推荐(0) 编辑

52. N-Queens II (Array; Back-Track)

摘要: Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions. 阅读全文

posted @ 2015-10-06 12:25 joannae 阅读(182) 评论(0) 推荐(0) 编辑

51. N-Queens (Array; Back-Track, Bit)

摘要: 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 @ 2015-10-06 12:22 joannae 阅读(194) 评论(0) 推荐(0) 编辑

2015年10月5日

44. Wildcard Matching (String; DP, Back-Track)

摘要: Implement wildcard pattern matching with support for '?' and '*'. *正则表达式的定义: '.' Matches any single character. '*' Matches zero or more of the precedi 阅读全文

posted @ 2015-10-05 19:07 joannae 阅读(162) 评论(0) 推荐(0) 编辑

93. Restore IP Addresses(dfs)

摘要: Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example:Given "25525511135", return ["2 阅读全文

posted @ 2015-10-05 09:51 joannae 阅读(227) 评论(0) 推荐(0) 编辑

40. Combination Sum II (Back-Track)

摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each num 阅读全文

posted @ 2015-10-05 08:31 joannae 阅读(150) 评论(0) 推荐(0) 编辑

39. Combination Sum (Back-Track)

摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeat 阅读全文

posted @ 2015-10-05 08:26 joannae 阅读(191) 评论(0) 推荐(0) 编辑

31. Next Permutation (Array; Math)

摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文

posted @ 2015-10-05 08:18 joannae 阅读(172) 评论(0) 推荐(0) 编辑

47. Permutations II (Back-Track, Sort)

摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following unique pe 阅读全文

posted @ 2015-10-05 07:07 joannae 阅读(206) 评论(0) 推荐(0) 编辑

46. Permutations (Back-Track,Sort)

摘要: Given a collection of numbers, return all possible permutations. For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3,1 阅读全文

posted @ 2015-10-05 07:01 joannae 阅读(233) 评论(0) 推荐(0) 编辑

上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 43 下一页

导航