
算法与数据结构
yunfuyiren
纯爷们
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
数组中查找第k小元素的复杂度为O(n)的算法
import java.util.Random; public class hello{ public static int []aa; public static void main(String args[]) { int []b=new int[11]; // int []b={8,4,7,8,6,5,10,8,6,10,8}; int l=0,k=5; Random原创 2014-03-13 21:18:37 · 3116 阅读 · 0 评论 -
打印给定一个数组序列的所有的排列的类n皇后问题
题目如下: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], [3,1,2], and [3,2,1]. 分析:如果只原创 2014-04-21 11:20:07 · 1031 阅读 · 0 评论