1.排序算法,有哪些,复杂度怎样,快排怎么排,什么思想
https://www.cnblogs.com/IUbanana/p/7056734.html
快速排序代码及注释:
package test;
public class quicksort {
public static void quickSort(int[] arr,int low,int high){
int i,j,temp,t;
//递归的终止条件一定要写全,当子数组为空或者只有一位的时候都可以直接return
if(low>=high){
return;
}
i=low;
j=high;
//temp就是基准位
temp = arr[low];
while (i<j) {
//先看右边,如果不是严格小于temp就继续往前
while (temp<=arr[j]&&i<j) {
j--;
}
//再看左边,如果不是严格大于temp就继续往后
while (temp>=arr[i]&&i<j) {
i++;
}
//如果满足条件则交换
if (i<j) {
t = arr[j];
arr[j] = arr[i];
arr[i] = t;
}
}
//因为每次交换之后都先走j再走i,所以最后一次i和j会相遇在前半部分的尾部
//因为交换的都是严格大于小于的元素,所以基准点的位置一直没有变,还是在low位置,这时将基准点与i互换即可。
arr[low] = arr[i];
arr[i] = temp;
for (int k = 0; k < arr.length; k++) {
System.out.print(" "+arr[k]);
}
System.out.println(" ");
//递归调用左半数组
quickSort(arr, low, i-1);
//递归调用右半数组
quickSort(arr, i+1, high);
}
public static void main(String[] args){
int[] arr = {10,17,10,5,4,6,62};
quickSort(arr, 0, arr.length-1);
for (int i = 0; i < arr.length; i++) {
System.out.print(" "+arr[i]);
}
}
}
归并排序代码及注释:
package test;
public class quicksort {
public static int[] mergesort(int[] a,int low,int high){
int mid = (low+high)/2;
if(low<high){
mergesort(a,low,mid);
mergesort(a,mid+1,high);
//左右归并
merge(a,low,mid,high);
}
return a;
}
public static void merge(int[] a, int low, int mid, int high) {
int[] temp = new int[high-low+1];
int i= low;
int j = mid+1;
int k=0;
// 把较小的数先移到新数组中
while(i<=mid && j<=high){
if(a[i]<a[j]){
temp[k++] = a[i++];
}else{
temp[k++] = a[j++];
}
}
//直接写了两个while循环,没有做哪个剩余的判断,反正为空的话while不会执行的
// 把左边剩余的数移入数组
while(i<=mid){
temp[k++] = a[i++];
}
// 把右边边剩余的数移入数组
while(j<=high){
temp[k++] = a[j++];
}
// 用新数组中的数遍历覆盖原来的数组,注意移位为low要恢复
for(int x=0;x<temp.length;x++){
a[x+low] = temp[x];
}
}
public static void main(String[] args){
int[] array={5,3,24,12,6,23,7};
array=mergesort(array,0,array.length-1);
for(int i=0;i<array.length;i++){
System.out.print(" "+array[i]);
}
}
}
2.二叉树的遍历 哪几种
https://blog.csdn.net/qq_33243189/article/details/80222629
https://blog.csdn.net/wang454592297/article/details/79472938
3.数据库引擎
https://blog.csdn.net/lilililililydia/article/details/88260802
4.数据库索引(B+树)
http://www.cnblogs.com/gavinsp/p/5513536.html
https://www.cnblogs.com/newpanderking/p/3781043.html
5.sql语句 like用途
https://www.cnblogs.com/acpe/p/4970765.html
6.网络分层
https://blog.csdn.net/iblade/article/details/80498132
https://www.cnblogs.com/jachin01/p/7828269.html
7.TCP/IP
https://blog.csdn.net/yulyu/article/details/69062288
8.TCP三次握手、四次挥手,为啥四次
https://blog.csdn.net/qq_38950316/article/details/81087809
https://baijiahao.baidu.com/s?id=1593714120815701015&wfr=spider&for=pc
9.HTTP get post
http://www.w3school.com.cn/tags/html_ref_httpmethods.asp
10.HTTP 状态码
https://www.cnblogs.com/xflonga/p/9368993.html
11.哈希
https://blog.csdn.net/duan19920101/article/details/51579136
12.常用的linux命令
https://www.cnblogs.com/gaojun/p/3359355.html
https://blog.csdn.net/q357010621/article/details/80248611
13.取一个文件的倒数后几行,包含某字段,什么命令
https://zhidao.baidu.com/question/216075604.html(Linux)
https://zhidao.baidu.com/question/430736273.html(shell)
14.android本地数据库
https://blog.csdn.net/u013700502/article/details/79067909
15.都知道哪些数据结构
https://www.cnblogs.com/ysocean/p/7889153.html
https://blog.csdn.net/world_snow/article/details/79073234
16.爬虫的流程
https://www.w3cschool.cn/python3/python3-dnjl2pw8.html
http://www.php.cn/python-tutorials-373310.html
17.nginx是什么的作用