字节跳动 基础架构研发实习生面试

2023-05-16

第一日 扫内推码投递的简历

第二日 收到hr面试通知,三天后网上面试

网上面试当天 牛客网上面试

  1. 根据简历项目进行自我介绍,自我介绍的时候共享屏幕展示了以前做过的项目。MFC可视化项目里边,面试官问到MFC中基础类库中对基础类有多少了解;
  2. 第二个项目自的我介绍说了基于百度地图使用Java进行编程;
  3. 第三个项目谈谈SpringBoot+Vue+mysql架构;
  4. 基础知识问到了说一下数据库的隔离级别,一般数据库有四种隔离级别
    1) read uncommitted(读未提交)
    2) read committed (读提交)
    3)repeated read (可重复读)
    4)serializable (可串行化)
    读未提交 :查询不加锁、一致性最差
    读提交: 只避免脏读
    可重复读:避免脏读、不可重复读
    串行化:避免脏读、不可重复读、幻读 效率差;
  5. sql索引有哪些 索引的机制
    聚簇索引 与表的物理排序顺序相同
    非聚簇索引 与数据库表的排列方式不同;
  6. 接着出了第一道算法题 给定二叉树的前序遍历和中序遍历 编程求后序遍历;
#include <iostream>
#include <string>
using namespace std;
struct node
{
	struct node* left;
	struct node* right;
	char c;
};

void order(char* inorder,char* preorder,int l)
{
	if (l==0)
	{
		return;
	}
	
	node* n=new node;
	n->c=*preorder;
	int rootindex =0;
	for(;rootindex<l;rootindex++)
	{
		if (inorder[rootindex]==*preorder)
		break;
	}
	order (inorder,preorder+1,rootindex);
	order (inorder+rootindex+1,preorder+rootindex+1,l-(rootindex+1));
	cout<<n->c<<endl;
	
}


int main()
 {
     
     char* pr="GDAFEMHZ";
     char* in="ADEFGHMZ";

     order(in, pr, 8);

     printf("\n");
     return 0;
 }
  1. 单链表求倒第k个元素的值;
#include <iostream>
using namespace std;

struct node{
	int data;
	node *next;
};

void create (node* &list)
{
	node *pre;
	node *cur;

	int n,m;
	cout<<"输入个数"<<endl; 
	cin>>n;	
	
	
	pre = new node;
	cin>>m;
	pre->data=m;
	
	list=pre;
	for(int i=1;i<n;i++)
	{
		int data;
		cin>>data;
		cur = new node;
		cur->data=data;
		cur->next=NULL;
		pre->next=cur;
		pre=cur;
	}
	cout<<"初始化完毕"<<endl; 
}

void print(node* list){
	cout << "链表元素为:" << endl;
	while(list){
		cout<< list->data << " ";
		list = list->next;
	}
	cout<<endl;
}

void find(node* list, int k){
	node *first =list;
	k--; 
	for (int i=0;i<k-1;i++)
	{
		if(first->next==NULL)
		{
			return;
		}
		else first=first->next;
	}
	 node *second=list;
	 
	 while(first->next!=NULL){
	 	first=first->next;
	 	second=second->next;
	 	
	 }
	 cout<<second->data<<endl;
	return;
}

int main(void){
	int k;
	node *list;
	create(list);
	print(list);
	cout<<"输入距离终点为K的点"<<endl; 
	cin>>k;
	find(list,k+1);
	return 0;
	
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

字节跳动 基础架构研发实习生面试 的相关文章

随机推荐