2019年3月菜鸟实习生电话面试题

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是什么的作用

https://www.cnblogs.com/wcwnina/p/8728391.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值