上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 33 下一页
摘要: he partition of an integer is a way of writing it as a sum of positive integers. For example, the partitions of the number 5 are:54+13+22+2+12+1+1+11+... 阅读全文
posted @ 2016-01-27 12:59 Hygeia 阅读(356) 评论(0) 推荐(0) 编辑
摘要: Implement the integral part logn base 2 with bit manipulationsint integralPartOfLog(unsigned int n){ int ret = 0; while (n > 0) { n =... 阅读全文
posted @ 2016-01-27 11:31 Hygeia 阅读(198) 评论(0) 推荐(0) 编辑
摘要: /* In "the 100 game," two players take turns adding, to a runningtotal, any integer from 1..10. The player who first causes the runningtotal to reach ... 阅读全文
posted @ 2016-01-27 11:03 Hygeia 阅读(265) 评论(0) 推荐(0) 编辑
摘要: A Bipartite Graph is a graph whose vertices can be divided into two independent sets, U and V such that every edge (u, v) either connects a vertex fro 阅读全文
posted @ 2016-01-26 03:13 Hygeia 阅读(608) 评论(0) 推荐(0) 编辑
摘要: Given a linked list where in addition to the next pointer, each node has a child pointer, which may or may not point to a separate list. These child l... 阅读全文
posted @ 2016-01-26 01:16 Hygeia 阅读(294) 评论(0) 推荐(0) 编辑
摘要: In Java, thePriorityQueueclass is implemented as a priority heap. Heap is an important data structure in computer science. For a quick overview of hea... 阅读全文
posted @ 2016-01-26 00:38 Hygeia 阅读(292) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array arr[0..n-1] of size n, find the minimum length subarray arr[s..e] such that sorting this subarray makes the whole array sorted... 阅读全文
posted @ 2016-01-25 12:08 Hygeia 阅读(234) 评论(0) 推荐(0) 编辑
摘要: /* Write a function to compute the maximum length palindromic sub-sequence of an array. A palindrome is a sequence which is equal to its reverse. A su... 阅读全文
posted @ 2016-01-25 05:14 Hygeia 阅读(159) 评论(0) 推荐(0) 编辑
摘要: public static String FindAndReplace(String GivenString, String Pattern, String ReplaceString) { int j = 0; int tempi; ... 阅读全文
posted @ 2016-01-25 03:17 Hygeia 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 设计一个generic class,要求支持add(T), remove(T), randomRemove(T)三个操作,并且必须保证都是O(1)。比如说add(cat), add(dog), add(pig), add(cat), remove(cat), remove(dog)等等,她还特意说必... 阅读全文
posted @ 2016-01-25 01:39 Hygeia 阅读(611) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 33 下一页