
算法
植物奶哇咔咔
扫地大法好
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
常用的排序算法
冒泡排序 时间是o(n2) 首先从序号0开始直到数组长度减1,查找最大值,并两两交换,将最大值交换到最后, import java.util.*; public class BubbleSort { public int[] bubbleSort(int[] A, int n) { // write code here int t = 0;原创 2016-02-21 13:19:15 · 303 阅读 · 0 评论 -
Leetcode448 Find All Numbers Disappeared in an Array
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] inclusive that do not appear in this array.原创 2017-04-11 11:16:42 · 237 阅读 · 0 评论