一.:设计模式面试题 & 课程介绍(1~4)
1.:几个经典算法面试题:
1)题
2)题
3)题
4)题
2.:内容介绍 + 授课方式:
1)
-1:
-2:
-3:
-4:
2)
-1:
-2:
-3:
-4:
3)
-1:
-2:
-3:
-4:
4)
-1:
-2:
-3:
-4:
二.:(~)
1.::
1)
-1:
-2:
-3:
-4:
2)
-1:
-2:
-3:
-4:
3)
-1:
-2:
-3:
-4:
4)
-1:
-2:
-3:
-4:
2.::
1)
-1:
-2:
-3:
-4:
2)
-1:
-2:
-3:
-4:
3)
-1:
-2:
-3:
-4:
4)
-1:
-2:
-3:
-4:
三.:排序算法 介绍 & 分类(50~76)
1.:排序介绍 & 复杂度计算:
1)排序方法介绍:
2)算法的时间复杂度:
3)时间频度
4)时间复杂度:
-1:常见的时间复杂度:【O(n平方)|O(以2为底,n的对数)|O(n)】
2.:冒泡排序:
1)
-1:
-2:
-3:
-4:
2)
-1:
-2:
-3:
-4:
3)
-1:
-2:
-3:
-4:
4)
-1:
-2:
-3:
-4:
3.:选择排序:
1)
-1:
-2:
-3:
-4:
4.:插入排序:
1)
-1:
-2:
-3:
-4:
5.:希尔排序:
1)
-1:
-2:
-3:
-4:
6.:快速排序:
1)介绍:
2)思路分析:
3)代码实现:
package com.example.suanfa.a1;
import java.util.Arrays;
/**
* @author zhangxudong@chunyu.me
* @date 2022/4/6 1:21 上午
*/
public class P6_kuaisu_2 {
public static void main(String[] args) {
int[] arr = {
-9, 78, 0, 23, -567, 70};
quickSort(arr, 0, arr.length - 1);
System.out.println(Arrays.toString(arr));
}
public static void quickSort(int[] arr, int left, int right) {
int l = left;// 左下标
int r = right;// 右下标
// 中轴:用作交换使用的 临时变量
int pivot = (left + right) / 2