当前位置:网站首页>7.7 sheen Xiyin written test
7.7 sheen Xiyin written test
2022-07-27 02:13:00 【Yu Xiaohe】
Cast Java Engineer position , The question type is 10 Multi channel single selection +5 There are many ways to choose +1 Algorithm questions +1 Avenue sql topic , Duration 1h
choice question
1.spring The propagation characteristics of things , The wrong is :
PROPAGATION_REQUIRED: Support current transaction , If there is no current transaction , Throw an exception .
( Should be : Support current transaction , If there is no current transaction , Just create a new transaction )
PROPAGATION_REQUIRED: Support current transaction , If there is no current transaction , Just create a new transaction .
PROPAGATION_SUPPORTS: Support current transaction , If there is no current transaction , Execute as a non transaction .
PROPAGATION_MANDATORY: Support current transaction , If there is no current transaction , Throw an exception .
PROPAGATION_REQUIRES_NEW: New transaction , If there are currently transactions , Suspend current transaction .
PROPAGATION_NOT_SUPPORTED: Perform operations in a non transactional way , If there are currently transactions , Suspend the current transaction .
PROPAGATION_NEVER: To execute in a non transactional manner , If there are currently transactions , Throw an exception .
2. In the following description of linear linked list , The right is :
When inserting and deleting , There is no need to move the elements in the linked list .
3. The correct description of the following program code is :
class HasStatic{
private static int x = 100;
public static void main(String args[ ]){
HasStatic hs1 = new HasStatic();
hs1.x++;
HasStatic hs2 = new HasStatic();
hs2.x++;
hs1=new HasStatic();
hs1.x++;
HasStatic.x--;
System.out.println( "x=" +x);
}
}

4. The following does not belong to hash The solution to the collision is :
Linear detection 、 Single rotation method 、 Second detection 、 Zipper method
5. The system allocates... To a process 4 Page boxes , The page number sequence accessed by this process is 2,0,2,9,3,4,2,8,2,4,8,4,5. If the page number of the next page visited is 7, basis LRU Algorithm , The page number of the page to be eliminated is :
2
6. process P1 and P2, resources A and B, The process operation on resources is defined as follows : Read resources A:rA; Read resources B:rB; Write resources A:wA; Write resources B:wB. At the same time, it stipulates , Before the process reads a resource , A shared lock must be added , An exclusive lock must be added before writing a resource ; When a resource is shared by a process , It can be shared by other processes , But you can't add an exclusive lock ; Resources are locked exclusively by processes , Other processes cannot be locked . Release the lock after the process completes all operations . process P1 And processes P2 Concurrent execution , Which of the following running sequences may deadlock _____.

Four necessary conditions for deadlock :
Resources are exclusive 、 Inalienable 、 Request and maintain 、 Loop waiting for .
7. Judge var1.intValue() Such output results
8. The following about HTTP/2 The description of is wrong :

D Describe the HTTPS
9. mysql The database has a course selection table learn(student_id int,course_id int), The fields represent student number and course number respectively , Now I want to get the number of courses selected by each student , May I ask the following sql The correct statement is ( )

10. Which of the following data structures is a nonlinear structure ?
The linear table 、 queue 、 Binary tree 、 Stack
11. solve hash Conflicting methods are described incorrectly ?

D

12. About the following code , The following statement is correct : ( )
public class Test {
private synchronized void a() {
}
private void b() {
synchronized (this) {
}
}
private synchronized static void c() {
}
private void d() {
synchronized (Test.class) {
}
}
}

AC
Modify non static methods Locked this object ; Modified static method Locked class object
13. Which of the following sql Statement query can make better use of index
14. Two threads execute the following code concurrently , hypothesis a Global variable , So the following output ___ Which is possible ?
int a=1;
void foo(){
++a;
printf("%d", a);
}32 23 33 22 It's possible

15.JDK17 Which of the following features are included ?
Algorithm problem
String decoding

lc The original title is Auxiliary stack method
class Solution {
public String decodeString(String s) {
StringBuilder res = new StringBuilder();
int multi = 0;
LinkedList<Integer> stack_multi = new LinkedList<>();
LinkedList<String> stack_res = new LinkedList<>();
for(Character c : s.toCharArray()) {
if(c == '[') {
stack_multi.addLast(multi);
stack_res.addLast(res.toString());
multi = 0;
res = new StringBuilder();
}
else if(c == ']') {
StringBuilder tmp = new StringBuilder();
int cur_multi = stack_multi.removeLast();
for(int i = 0; i < cur_multi; i++) tmp.append(res);
res = new StringBuilder(stack_res.removeLast() + tmp);
}
else if(c >= '0' && c <= '9') multi = multi * 10 + Integer.parseInt(c + "");
else res.append(c);
}
return res.toString();
}
}
Mysql
Some question and answer 11 Monthly and daily responses per capita
There is a question and answer creator's answer table answer_tb as follows ( among answer_date Indicates the creation date 、author_id Refers to the creator number 、issue_id Express problem id、char_len Indicates the number of words in the answer ):

Please make statistics 11 Monthly and daily responses per capita ( Number of questions answered / The number of respondents ), Sort by answer date , Two decimal places are reserved for the result , The output of the above example is as follows :


select answer_date,
round(count(issue_id)/count(DISTINCT author_id),2) per_num
from answer_tb
where month(answer_date) = 11
group by answer_date
select answer_date, round(count(*)/count(distinct author_id), 2)
from answer_tb
group by answer_date
order by answer_date;边栏推荐
- OGeek Meetup第一期,携手CubeFS火热来袭
- Autojs learning - realize image cutting
- DF-GAN实验复现——复现DFGAN详细步骤 及使用MobaXtem实现远程端口到本机端口的转发查看Tensorboard
- Text to image论文精读DF-GAN:A Simple and Effective Baseline for Text-to-Image Synthesis一种简单有效的文本生成图像基准模型
- Specify that SQL only supports select syntax
- When El table is selected, the jump page remains selected
- 2022年T2I文本生成图像 中文期刊论文速览-1(ECAGAN:基于通道注意力机制的文本生成图像方法+CAE-GAN:基于Transformer交叉注意力的文本生成图像技术)
- Redis uses queues for consumption
- 6.30联发科笔试
- VLAN原理简述、具体实验配置
猜你喜欢

最新C语言入门与进阶 -史上最全最详细的C语言教程!! 第一节-总览C语言概括

Docker advanced: detailed explanation of MySQL master-slave replication and redis cluster capacity expansion and reduction configuration cases

ViTGAN:用视觉Transformer训练生成性对抗网络 Training GANs with Vision Transformers

mysql一个select语句的执行过程

7.7 SHEIN希音笔试

ACM模式输入输出练习

Machine learning exercise 7 - K-means and PCA (principal component analysis)

OSPF静态大实验

Gan's training skills: alchemist cultivation plan - generative confrontation network training, participation and improvement

Text to image paper intensive reading rat-gan: recursive affine transformation for text to image synthesis
随机推荐
行,表,页,共享,排他,悲观,乐观,死锁
机械硬盘选购指南——从选购经历谈起
Realize data interaction between two apps through fileprovider
[FPGA tutorial case 29] the second DDS direct digital frequency synthesizer based on FPGA - Verilog development
FID index reproduction step on the pit to avoid the pit text generation image FID quantitative experiment whole process reproduction (FR é Chet inception distance) quantitative evaluation experiment s
HCIA基础知识(1)
三范式,约束,部分关键字区别,
[explain C language in detail] takes you to play with functions
Text to image paper intensive reading ssa-gan: text to image generation with semantic spatial aware Gan
2022最新直播监控24小时监控(三)直播间弹幕解析
Text to image paper intensive reading rat-gan: recursive affine transformation for text to image synthesis
When El table is selected, the jump page remains selected
mgre的全连和星型拓扑实验
Tinyint type map is received and returned as Boolean
最新C语言入门与进阶 -史上最全最详细的C语言教程!! 第一节-总览C语言概括
解决方案:Win10如何使用bash批处理命令
第五讲—按键控制LED
【数据库课程设计】SQLServer数据库课程设计(学生宿舍管理),课设报告+源码+数据库关系图
(atcoder contest 144) f - fork in the road (probability DP)
科学计算库 —— Numpy