数据结构与算法
Mr_树先森
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【排序算法】希尔排序,快速排序
1.希尔排序:希尔排序交换式:希尔排序移位法:2.快速排序:原创 2021-07-23 10:30:00 · 113 阅读 · 0 评论 -
【排序算法】选择排序,插入排序
1.选择排序:代码实现: public static void selectSort(int[] array){ for (int j = 0;j < array.length-1;j++) { int minIndex = j; int min = array[j]; for (int i = j+1; i < array.length; i++) { if原创 2021-07-22 20:17:37 · 100 阅读 · 1 评论 -
【排序算法】介绍,冒泡排序
介绍:冒泡排序: for (int i = 0; i<num.length-1;i++){ for (int j = 0;j<num.length-i-1;j++){ if (num[j]>num[j+1]){ int temp = num[j]; num[j] = num[j+1]; num[j+原创 2021-07-22 17:02:07 · 84 阅读 · 0 评论 -
【算法】递归
1.递归:迷宫问题:八皇后问题:原创 2021-07-22 15:58:08 · 87 阅读 · 0 评论 -
【数据结构】中缀表达式转后缀表达式
1.栈的前缀中缀后缀表达式:原创 2021-07-22 15:19:26 · 147 阅读 · 0 评论 -
【数据结构】栈实现计算器
1.用栈实现计算器:public class test { public static void main(String[] args) { String e = "70+2*6-4"; Stack num = new Stack(10); Stack operate = new Stack(5); int index = 0; int num1 = 0; int num2 = 0;原创 2021-07-22 14:31:30 · 363 阅读 · 0 评论 -
【数据结构】数组模拟栈
1.栈:数组模拟栈:class Stack{ private int maxSize; private int[] stack; private int top = -1; public Stack(int maxSize) { this.maxSize = maxSize; stack = new int[maxSize]; } public boolean isFull(){ return原创 2021-07-22 11:24:23 · 84 阅读 · 0 评论 -
【数据结构】单向环形链表
1.单向循环链表:代码实现:class Boy{ private int no; private Boy next; public Boy(int no) { this.no = no; } public int getNo() { return no; } public void setNo(int no) { this.no = no; } public Boy原创 2021-07-22 10:50:11 · 89 阅读 · 0 评论 -
【数据结构】双向链表
1.双向链表:代码实现:class Node{ public int no; public String name; public Node next; public Node pre; public Node(int no, String name) { this.no = no; this.name = name; } @Override public String toString() {原创 2021-07-22 09:41:32 · 89 阅读 · 0 评论 -
【数据结构】单链表以及面试题
1.链表:介绍:原创 2021-07-22 09:15:52 · 99 阅读 · 0 评论 -
【数据结构】线性结构非线性结构,队列
1.线性结构和非线性结构:2.队列:数组实现队列:class ArrayQueue { private int front; private int rear; private int MaxSize; private int[] array; public ArrayQueue(int maxSize) { MaxSize = maxSize; array = new int[maxSize]; fr原创 2021-07-21 18:36:13 · 361 阅读 · 0 评论
分享