[java书籍] 华为笔试题.doc

[复制链接]
发表于 2022-6-15 16:52:12
单选20,多选10,改错3,编程2
有数据结构、网络、操作系统、数据库
1、单项选择题(4选1)
<:
1.如果有N个节点用二叉树结构来存储,那么二叉树的最小深度是:
解析:深度为k的二叉树,最多有2~k-1个节点,这时的二叉树成为满二叉树。Log:(N+1)
2.形结构的一种重要运算。若已知一棵二叉树的前序序列是BEFCGDH,中序序列是FEBCCHD,则后序序列是:FEGHDCB
3.下列算法的功能是:
1杠是无头节点单链表*/
LinkList Demo(LinkList L){
ListNode *Q,*P:
If(L&&L一>next){
Q=L;
L=L->next;P=L;
While(p->next)P=p->next;p->next=Q;Q->next=NULL;
}
return L;
解析:将单链表转变为循环链表头结点转变为尾节点


(Single choice 20, multiple choice 10, error correction 3, programming 2
Data structure, network, operating system and database
1. Single choice questions (1 out of 4)
<:
1. if n nodes are stored in a binary tree structure, the minimum depth of the binary tree is:
Analysis: a binary tree with a depth of K has at most 2~k-1 nodes. At this time, the binary tree becomes a full binary tree. Log:(N+1)
2. an important operation of shape structure. If the pre sequence of a binary tree is known to be befcgdh and the mid sequence is febcchd, then the post sequence is feghdcb
3. the functions of the following algorithms are:
1 bar is a headless node single chain table*/
LinkList Demo(LinkList L){
ListNode *Q,*P:
If (l&&l I >next){
Q=L;
L=L->next; P=L;
While(p->next)P=p->next; p->next=Q; Q->next=NULL;
}
return L;
Analysis: transform a single linked list into a circular chain header node into a tail node)

[下载]16521199361.rar




上一篇:125条常见的java面试笔试题大汇总.pdf
下一篇:android面试题目及其答案大全.doc

使用道具 举报

Archiver|手机版|小黑屋|吾爱开源 |网站地图

Copyright 2011 - 2012 Lnqq.NET.All Rights Reserved( ICP备案粤ICP备14042591号-1粤ICP14042591号 )

关于本站 - 版权申明 - 侵删联系 - Ln Studio! - 广告联系

本站资源来自互联网,仅供用户测试使用,相关版权归原作者所有

快速回复 返回顶部 返回列表