Skip to content

Commit

Permalink
图床迁移
Browse files Browse the repository at this point in the history
  • Loading branch information
humingk committed Jun 4, 2024
1 parent 0390bef commit 3bf7db1
Show file tree
Hide file tree
Showing 14 changed files with 122 additions and 125 deletions.
66 changes: 33 additions & 33 deletions _posts/2019-03-18-alg-note.md
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ sink规则:
}
```

![](../img/alg/heap.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/heap.png)

#### 完整代码

Expand Down Expand Up @@ -829,7 +829,7 @@ class Solution {
sort(a, lo, j - 1);
sort(a, j + 1, hi);
```
![](../img/alg/quick1.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/quick1.png)

#### 切分 - 默认第一个为key

Expand Down Expand Up @@ -881,15 +881,15 @@ class Solution {



![](../img/alg/quick2.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/quick2.png)

#### 快速排序中切分的四种方式

##### 1. 交换法(上述采用方法)

左右元素进行交换

![](../img/alg/sort_quick_partition1.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/sort_quick_partition1.png)

前后遍历双切分:
https://leetcode.cn/problems/sort-an-array/
Expand Down Expand Up @@ -982,13 +982,13 @@ https://leetcode.cn/problems/sort-an-array/

key元素作为一个坑,右边遍历比key小的,左边遍历比key大的,都与坑交换

![](../img/alg/sort_quick_partition2.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/sort_quick_partition2.png)

##### 3. 顺序遍历法

1和2都是前后向中间遍历,此处顺序遍历

![](../img/alg/sort_quick_partition3.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/sort_quick_partition3.png)

顺序遍历双切分

Expand Down Expand Up @@ -1394,7 +1394,7 @@ public class Quick3way {
}
```

![](../img/alg/merge1.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/merge1.png)

#### 排序

Expand All @@ -1409,7 +1409,7 @@ public class Quick3way {
merge(a,aux,lo,mid,hi);
```

![](../img/alg/merge2.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/merge2.png)

#### 完整代码

Expand Down Expand Up @@ -1597,7 +1597,7 @@ class Solution {
}
```

![](../img/alg/shell1.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/shell1.png)

如下图所示,当h=13的时候,分别对以下三个序列进行插入排序:

Expand All @@ -1619,7 +1619,7 @@ E O X L

L R A E

![](../img/alg/shell2.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/shell2.png)

#### 完整代码

Expand Down Expand Up @@ -2112,7 +2112,7 @@ https://github.com/alibaba/p3c
- get(),put() 实现均为遍历链表进行比较
- 基于链表的实现和顺序查找是非常低效的

![](../img/alg/search1.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/search1.png)

#### 完整代码

Expand Down Expand Up @@ -2242,7 +2242,7 @@ public class SequentialSearchSt<Key, Value> {

一对平行的有序数组,分别存储keys和values

![](../img/alg/search2.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/search2.png)

#### 递归的二分查找

Expand Down Expand Up @@ -2465,7 +2465,7 @@ public class BinarySearchSt<Key extends Comparable<Key>, Value> {

#### floor 小于等于key的节点中的最大节点

![](../img/alg/floor.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/floor.png)

```java
private Node floor(Node x, Key key) {
Expand Down Expand Up @@ -2496,7 +2496,7 @@ public class BinarySearchSt<Key extends Comparable<Key>, Value> {

#### select 找出排名为k的节点

![](../img/alg/select.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/select.png)

```java
private Node select(Node x, int k) {
Expand All @@ -2516,7 +2516,7 @@ public class BinarySearchSt<Key extends Comparable<Key>, Value> {

#### deleteMin 删除最小节点

![](../img/alg/deletemin.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/deletemin.png)

```java
private Node deleteMin(Node x) {
Expand All @@ -2537,7 +2537,7 @@ public class BinarySearchSt<Key extends Comparable<Key>, Value> {

删除x节点,右子树中的最小节点将代替x节点,代替后,将右子树最小节点删除,新的x节点右链接指向新的右子树,左链接指向原来的x节点左子树

![](../img/alg/delete.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/delete.png)

```java
public Node delete(Node x, Key key) {
Expand Down Expand Up @@ -2998,11 +2998,11 @@ delete P and E then:

#### 左旋转

![](../img/alg/leftrotate.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/leftrotate.png)

#### 颜色转换

![](C:/Users/mingjun.hu/github/humingk.github.io/img/alg/colorflip.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/colorflip.png)

可以改成翻转颜色,如下:

Expand All @@ -3023,15 +3023,15 @@ delete P and E then:
- 1.左插入,成红色左链接
- 2.右插入,成红色右链接,左旋

![](C:/Users/mingjun.hu/github/humingk.github.io/img/alg/insert12.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/insert12.png)

二、向三节点插入:

- 3.最大的位置插入,成红色右链接,'八'形红色链接,颜色转换
- 4.最小的位置插入,成红色左链接,'/'形红色链接,先右旋转下部,'八'形红色链接,再颜色转换
- 5.中间的位置插入,成红色右链接,'<'型红色链接,先左旋转下部,'/'型红色链接,再右旋转上部,'八'型红色链接,再颜色转换

![](../img/alg/insert345.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/insert345.png)


```java
Expand Down Expand Up @@ -3071,7 +3071,7 @@ delete P and E then:
}
```

![](../img/alg/insertdiff.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/insertdiff.png)

#### balance

Expand Down Expand Up @@ -3102,7 +3102,7 @@ x是红色节点,x.left 和 x.left.left 都是黑色节点

将x.left 或 x.left的左子节点 变成红色节点

![](../img/alg/moveRedLeft.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/moveRedLeft.png)

```java
private Node moveRedLeft(Node x) {
Expand All @@ -3122,7 +3122,7 @@ x为红色节点,x.right 和 x.right.left是黑色节点

将x.right 或 x.right 的右子节点 变成红色

![](../img/alg/moveRedRight.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/moveRedRight.png)

```java
private Node moveRedRight(Node x) {
Expand All @@ -3138,7 +3138,7 @@ x为红色节点,x.right 和 x.right.left是黑色节点

沿着左链接向下,确保当前节点不是二节点(可以是三节点和临时的四节点),

![](C:/Users/mingjun.hu/github/humingk.github.io/img/alg/reddeletemin.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/reddeletemin.png)

```java
public void deleteMin() {
Expand Down Expand Up @@ -7670,7 +7670,7 @@ eg:

3个骰子的情况,有:

![](https://s2.loli.net/2022/04/18/piQVYIF2cGHmv6u.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/piQVYIF2cGHmv6u.png)

```java
class Solution {
Expand Down Expand Up @@ -13436,7 +13436,7 @@ true

从上往下打印出二叉树的每个节点,同层节点从左至右打印。

![之字形打印](../img/alg/z_tree_print.png)
![之字形打印](https://raw.githubusercontent.com/humingk/resource/master/image/2019/z_tree_print.png)

#### 解法1 +测试 打印一行

Expand Down Expand Up @@ -16118,27 +16118,27 @@ public class TwoStackToQueue {

函数如图所示:

![](../img/alg/fib4.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/fib4.png)

5. 矩阵乘法+矩阵快速幂,O(logN)

其推导过程如图所示:

![](../img/alg/fib3.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/fib3.png)

其中对于矩阵快速幂的求解,有两种方法:

- 递归(**二分法**)求矩阵快速幂

如图所示:

![](../img/alg/fib2.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/fib2.png)

- 循环(**二进制法**)求矩阵快速幂

如图所示,本来需要156次计算,现在只需要(二进制个数8×二进制中1的个数4=32次)计算,矩阵也是如此

![](../img/alg/fib5.jpg)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/fib5.jpg)

#### 递归+从下而上+矩阵乘方之递归 O(logN)

Expand Down Expand Up @@ -18153,7 +18153,7 @@ OJ:

eg:

![](../img/alg/square.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/square.png)

PS:这里不能用贪心算法,因为这里需要找到个数最少的组合,如果每一次都贪心,比如12的时候采用3+3×3而不是8+2×2,个数反而更多了完全

Expand Down Expand Up @@ -18290,11 +18290,11 @@ OJ:

递推公式:

![](../img/alg/lcs2.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/lcs2.png)

eg:

![](../img/alg/lcs.png)
![](https://raw.githubusercontent.com/humingk/resource/master/image/2019/lcs.png)



Expand Down
19 changes: 8 additions & 11 deletions _posts/2019-05-14-other-doubans.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
layout: post
title : 实现一个综合电影网站(可行性分析与实践)
categories : other
---

集合各大电影网站数据,能够让影迷们快速获取各大电影网站的电影评分信息,浏览相关电影来自豆瓣电影、知乎、网易云音乐等平台的评价与讨论,在线欣赏电影的背景音乐,甚至查询相关电影的实际拍摄地点,电影场景取景地等

Expand Down Expand Up @@ -32,7 +30,7 @@ categories : other



![image-20220511125914026](https://s2.loli.net/2022/05/11/NuOXYf327vm6jVD.png)
![image-20220511125914026](https://raw.githubusercontent.com/humingk/resource/master/image/2019/NuOXYf327vm6jVD.png)



Expand Down Expand Up @@ -92,7 +90,7 @@ categories : other



![image-20220511125339686](C:/Users/mingjun.hu/AppData/Roaming/Typora/typora-user-images/image-20220511125339686.png)
![image-20220511125339686](https://raw.githubusercontent.com/humingk/resource/master/image/2019/movie_2.0_er.png)

## 一、数据模块

Expand All @@ -104,7 +102,7 @@ categories : other

### 流程图

![image-20220511124928273](https://s2.loli.net/2022/05/11/q5ivIW6BLUnrYT1.png)
![image-20220511124928273](https://raw.githubusercontent.com/humingk/resource/master/image/2019/q5ivIW6BLUnrYT1.png)

### 流程图功能描述

Expand Down Expand Up @@ -156,13 +154,13 @@ categories : other



![image-20220511125502770](https://s2.loli.net/2022/05/12/jIYZf6NHQa8KeEl.png)
![image-20220511125502770](https://raw.githubusercontent.com/humingk/resource/master/image/2019/jIYZf6NHQa8KeEl.png)



截止2020年,数据库维护详情

![image-20220511130231552](https://s2.loli.net/2022/05/11/vfiBIjl25beOuaU.png)
![image-20220511130231552](https://raw.githubusercontent.com/humingk/resource/master/image/2019/vfiBIjl25beOuaU.png)



Expand Down Expand Up @@ -194,13 +192,13 @@ categories : other

### 后端接口功能测试

![image-20220511130702825](https://s2.loli.net/2022/05/11/lAntjRKMF7Wh95f.png)
![image-20220511130702825](https://raw.githubusercontent.com/humingk/resource/master/image/2019/lAntjRKMF7Wh95f.png)



### 后端接口性能测试

![image-20220511130745795](https://s2.loli.net/2022/05/11/vxYSUto5fqA2s9L.png)
![image-20220511130745795](https://raw.githubusercontent.com/humingk/resource/master/image/2019/vxYSUto5fqA2s9L.png)



Expand Down Expand Up @@ -244,8 +242,7 @@ PS:后端服务器已下线,目前只展示一部电影,后端API已不可

### 电影评分雷达图

![image-20220511133047444](https://s2.loli.net/2022/05/11/h47urdjebWx5PEo.png)
![image-20220511133047444](https://raw.githubusercontent.com/humingk/resource/master/image/2019/h47urdjebWx5PEo.png)



![image-20220511133114278](C:/Users/mingjun.hu/AppData/Roaming/Typora/typora-user-images/image-20220511133114278.png)
Loading

0 comments on commit 3bf7db1

Please sign in to comment.