上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: Given an unsorted integer array, find the first missing positive integer. For example, Given return , and return . Your algorithm should run in time a 阅读全文
posted @ 2017-03-27 21:10 aiterator 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 H国正在进行一项持续N周的填海造岛工程。整片工程海域可以被看作是1000x1000的网格。 每周都有一块1x1的单位方格海域被填成陆地。如果我们将连成一片的陆地(一块单位方格与它上下左右4个单位方格是相连的)视为岛屿,H国 阅读全文
posted @ 2017-03-26 17:12 aiterator 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi现在有n个物品,每个物品都有一个价值。并且这n个物品总共有m个不同的属性,每个物品都具有其中若干属性。 小Ho要从中选出若干物品,满足每个属性都正好有奇数个物品拥有,且被选出的物品价值总和最大。你能帮助小Ho完成任务 阅读全文
posted @ 2017-03-26 17:04 aiterator 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 如果一个字符串恰好包含2个'h'、1个'i'和1个'o',我们就称这个字符串是hiho字符串。 例如"oihateher"、"hugeinputhugeoutput"都是hiho字符串。 现在给定一个只包含小写字母的字符串 阅读全文
posted @ 2017-03-26 16:51 aiterator 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 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 . Eac 阅读全文
posted @ 2017-03-25 00:08 aiterator 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums 阅读全文
posted @ 2017-03-23 19:03 aiterator 阅读(135) 评论(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 on 阅读全文
posted @ 2017-03-22 09:05 aiterator 阅读(109) 评论(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 with 阅读全文
posted @ 2017-03-21 22:54 aiterator 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexi 阅读全文
posted @ 2017-03-20 22:45 aiterator 阅读(77) 评论(0) 推荐(0) 编辑
摘要: Suppose an array sorted in ascending order 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). You a 阅读全文
posted @ 2017-03-20 22:44 aiterator 阅读(80) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页