
编程刷题
文章平均质量分 54
AmazingJadeWu
Github:https://github.com/amazingWu
开源中国:https://git.oschina.net/WU_QI
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
编程刷题-双核CPU
一种双核CPU的两个核能够同时的处理任务,现在有n个已知数据量的任务需要交给CPU处理,假设已知CPU的每个核1秒可以处理1kb,每个核同时只能处理一项任务。n个任务可以按照任意顺序放入CPU进行处理,现在需要设计一个方案让CPU处理完这批任务所需的时间最少,求这个最小的时间。 输入描述: 输入包括两行: 第一行为整数n(1 ≤ n ≤ 50) 第二行为n个整数length[i](102原创 2017-05-25 23:04:47 · 1029 阅读 · 0 评论 -
Number of permutation with K inversions
Given an array, an inversion is defined as a pair a[i], a[j] such that a[i] > a[j] and i < j. We are given two numbers N and k, we need to tell how many permutation of first N number have exactly K inv原创 2017-05-27 00:11:32 · 491 阅读 · 0 评论 -
'动态规划:word-break'
题目描述Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s =”leetcode”, dict =[“leet”,原创 2017-06-09 11:42:55 · 327 阅读 · 0 评论 -
编程—回文序列
如果一个数字序列逆置之后跟原序列是一样的就称这样的数字序列为回文序列。例如: {1, 2, 1}, {15, 78, 78, 15} , {112} 是回文序列, {1, 2, 2}, {15, 78, 87, 51} ,{112, 2, 11} 不是回文序列。 现在给出一个数字序列,允许使用一种转换操作: 选择任意两个相邻的数,然后从序列移除这两个数,并用这两个数字的和插入原创 2017-08-13 13:53:57 · 559 阅读 · 0 评论