上一页 1 2 3 4 5 6 7 ··· 10 下一页

2016年11月25日

归并排序

摘要: 主要思想是先对序列进行分割,然后再进行归并排序。如一个数组[1,2,3,4,5,6]第一次分割为[1,2,3],[4,5,6]第二次分割为[1,2],[3],[4,5],[6]第三次分割为[1],[2],[3],[4],[5,[6]第一次归并排序为[1],[2];[4],[5]...以此类推public class MergeSort { private double[] bridge;... 阅读全文

posted @ 2016-11-25 11:15 猫儿爹 阅读(253) 评论(0) 推荐(0) 编辑

2016年11月21日

linkedLoop

摘要: public class linkQueue { private class Node{ E e; Node next; public Node(){} public Node(E e,Node next){ this.e=e; this.next=... 阅读全文

posted @ 2016-11-21 19:18 猫儿爹 阅读(150) 评论(0) 推荐(0) 编辑

loopqueue

摘要: import java.util.Arrays; public class loopQueue { public Object[] data=null; private int maxsize; private int rear;//队尾 private int front;// private int size=0; pub... 阅读全文

posted @ 2016-11-21 11:06 猫儿爹 阅读(242) 评论(0) 推荐(0) 编辑

2016年11月18日

expect 切换用户

摘要: 安装expect yum install expect -y#!/bin/expect -f spawn su - expect "Password:" send "netbrain\r" interact 阅读全文

posted @ 2016-11-18 09:21 猫儿爹 阅读(389) 评论(0) 推荐(0) 编辑

2016年11月17日

二叉树的实现

摘要: import java.util.LinkedList; import java.util.List; public class createBinaryTree { int [] array={1,2,3,5,6,7,8,9,11,23,45}; static List nodelist=null; public static void main(Stri... 阅读全文

posted @ 2016-11-17 20:26 猫儿爹 阅读(191) 评论(0) 推荐(0) 编辑

2016年11月10日

栈的链表实现, 底层使用链表

摘要: package suanfa; public class MylinkStack implements Mystack { private Node1 top=null; int size=0; @Override public boolean isempty() { // TODO Auto-gene... 阅读全文

posted @ 2016-11-10 19:34 猫儿爹 阅读(231) 评论(0) 推荐(0) 编辑

栈的数组实现

摘要: 1.首先定义了栈需要实现的接口 2.栈的数组实现 if(size==0){ return null; } return (T) obs[--size]; 阅读全文

posted @ 2016-11-10 11:24 猫儿爹 阅读(519) 评论(0) 推荐(0) 编辑

RSA加密算法

摘要: RSA是非对称加密算法,客户端生成一对密匙秘钥,公钥用于加密,私钥用于解密package RSA; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOExcepti... 阅读全文

posted @ 2016-11-10 10:51 猫儿爹 阅读(397) 评论(0) 推荐(0) 编辑

2016年11月9日

输入一个链表,反转链表后,输出链表的所有元素

摘要: import com.doubleLinkedList.Node; public class ReverseList { public Node ReverseList1(Node head){ Node current=head; Node prevnode=null; Node newhead=null; ... 阅读全文

posted @ 2016-11-09 17:48 猫儿爹 阅读(1090) 评论(0) 推荐(0) 编辑

2016年11月8日

输入一个链表,输出该链表中倒数第k个结点

摘要: package suanfa; import suanfa.doubleLinkedList.Node; public class solution { public Node find(Node head,int k){ int size=0; Node current=head; while(c... 阅读全文

posted @ 2016-11-08 20:29 猫儿爹 阅读(170) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 10 下一页

导航