首页 > 字节飞书后端校招一面凉经
头像
好想有人带带我
编辑于 2021-03-22 21:22
+ 关注

字节飞书后端校招一面凉经

1、介绍自己
2、从浏览器输入url到获取内容,发生了什么事
3、tcp为什么要三次握手不用两次或是一次
4、mysq索引实现原理
5、场景题:单词统计,大量单词,统计次数,要求高效率(回答了hashmap存,结果面试官说效率和hash碰撞问题,又回答了用数据库存,还是效率问题,最后多线程读写,统计合并结果,不知道回答的对不对,感觉这道题没答好)
6、介绍nginx,正向代理和反向代理,负载均衡实现
7、聊项目,问了nosql数据库实现(不会。。)
8、本地idea代码题,给定一个链表,1->2->3->4->5->6,要求交替头尾输出内容如:1->6>2->5->3->4(要交换指针,做出来了,但暂时没想到其他方法)
    public static void print(Node head) {
        int i = 0;
        Node tmp = head;
        while (tmp != null) {
            tmp = tmp.next;
            i++;  //获取链表长度
        }  
        int middle = i / 2 - 1;  //找到中间节点位置
        Node mHead = null;
        Node tmp2 = head;
        while (middle > 0) {
            middle--;
            tmp2 = tmp2.next;
        }
        mHead = tmp2.next;  //中间节点
        tmp2.next = null;
        mHead = reverseList(mHead);  //反转后半部分
        Node cur = head;     
        while(cur!=null&&mHead!=null){  //两个链表再交替输出并重新定义指针指向
            Node next = cur.next;
            Node next1 = mHead.next;
            cur.next = mHead;
            mHead.next = next;
            mHead = next1;
            cur = next;
        }
        while(head!=null){  //输出
            System.out.print(head.val);
            head = head.next;
        }
    }
//反转链表
    public static Node reverseList(Node head) {
        Node prev = null;
        Node curr = head;
        while (curr != null) {
            Node next = curr.next;
            curr.next = prev;
            prev = curr;
            curr = next;
        }
        return prev;
    }
感觉整体还行,但是面完20min后就直接邮件凉了

更多模拟面试

全部评论

(4) 回帖
加载中...
话题 回帖

推荐话题

相关热帖

历年真题 真题热练榜 24小时
技术(软件)/信息技术类
查看全部

近期精华帖

热门推荐