- 博客(7)
- 问答 (1)
- 收藏
- 关注
原创 将整形数转换为二进制数
package com.test;public class ToBinary {public static void main(String[] args) {int n = 120;char[] ch = new char[32];int m = 1;for(int i =0;iint t = m&n;if(t>0){ch[ch.length-i-
2014-10-07 19:03:36
737
原创 冒泡排序
package com.paixu;public class BubbleSort {public int[] bubblesort(int[] src){for(int i=0;ifor(int j=i+1;jif(src[i]>src[j]){int temp = 0;temp = src[i];src[i] = src[j];src[j] =
2014-09-29 15:47:41
302
原创 快速排序
package com.paixu;public class QuickSort {public int quicksort(int[] src,int low ,int high){int l = src[low];int pivotkey = src[low];while(lowwhile((low=pivotkey)){high--;}src[
2014-09-29 15:46:47
269
原创 希尔排序
package com.paixu;public class SheelSrot {public int[] sheelSort(int[] src){int l ;for(int dk = src.length/2;dk>0;dk/=2){for(int i=dk;iint j=i-dk;l = src[i];while((j>=0)&&(lsrc
2014-09-29 15:46:35
257
原创 直接插入排序
package com.paixu;//直接插入排序public class SISort {public int[] sisort(int[] src){int l;for(int i=1;iint j=i-1;l = src[i];while((j>=0)&&(lsrc[j+1] = src[j];j--;}src[j+1]
2014-09-29 15:43:55
275
原创 Java实现单链表
package com.test;public class Node {public Node next;//指针域public Object data;//数据域public Node(Object data){this.data = data;this.next = null;}}package com.test;
2014-09-27 13:12:38
361
空空如也
actionbar ,actionmode样式修改
2015-09-10
TA创建的收藏夹 TA关注的收藏夹
TA关注的人