一、腾讯地图二面面试情况
面试平台:牛客网
面试时间:4.22,17:00---18:00
考察题目:项目+算法题
二、项目情况
(请根据自己项目酌情准备,在此记录是为了后面更好的完善自己的简历)
迁移学习室内定位的项目
1、你在项目中负责的工作有哪些?
2、预处理阶段做了哪些工作?
多进程通信的项目
1、多个消费者怎么保证消费者下单安全的问题?
对于售货员和消费者在售卖的过程中加一把锁
2、当程序出现问题时候,如何保证锁可以被释放?
3、讲讲信号量机制
4、为什么采用消息队列来通信?
5、售货员是多线程的,如何保证多个售货员来服务同一个消费者的情况?
三、算法编程
题目:两个有序链表的合并
比较简单,可以在自己的IDE上面编写
/**
* @program: tecent
* @author: nyz
* @create: 2021-04-22 17:31
* @description://合并有序链表
**/
public class Tecent {
public static class Node{
int data;
Node next;
public Node(int data){
this. data=data;
}
}
public static Node mergelist(Node first,Node second){
if(first==null&&second==null){
return null;
}
if(first==null){
return second;
}
if(second==null){
return first;
}
Node root=null;//新链表的头
Node cur=null,nex=null;
while (first!=null&&second!=null){
if(first.data>=second.data){
nex=second;
second=second.next;
}
else{
nex=first;
first=first.next;
}
if(root==null){
root=nex;
cur=root;
}
else{
cur.next=nex;
cur=nex;
}
}
if(first==null) {
cur.next=second;
}
if(second==null) {
cur.next=first;
}
return root;
}
public static void main(String[] args) {
Node node1=new Node(1);
Node node3=new Node(3);
Node node5=new Node(5);
Node node2=new Node(2);
Node node4=new Node(4);
Node node6=new Node(6);
//1--3--5
node1.next=node3;
node3.next=node5;
//2--4--6
node2.next=node4;
node4.next=node6;
Node mergelist = mergelist(node1, node2);
while (mergelist!=null){
System.out.println(mergelist.data);
mergelist=mergelist.next;
}
}
}