当前位置:网站首页>2021 Niuke written examination summary 02
2021 Niuke written examination summary 02
2022-07-25 10:32:00 【PBitW】
List of articles
Niu Kewang written test
This article is the problem of Niuke at the beginning , Tell the truth , Unclear this Point to or new The principle of is not mastered , Basically can't do ; Then there is you, except for meeting Front end and TCP/IP, You have to know java Threads 、 database 、 data structure , Don't talk much , Go straight to the question !
Threads X Yes wait Method , It will not return because of which operation
1、B Thread calls X Of Join() Method
2、C Threads call shared variables notifyAll()
3、A Threads call shared variables notify()
4、D Thread calls X Of interrupt()
answer :?
This rookie won't give the answer , Because it's really beyond my ability , Leave reference here , I hope readers can actively leave messages , Actually, I didn't want to write this article , But when I think about it, I still have a little fantasy , I hope readers can actively communicate !
Reference resources :wait()、join()、sleep()、yield() and interrupt() Method
InnoDB Transaction isolation level Serializable What problems can be solved
1、 Fantasy reading
2、 It can't be read repeatedly
3、 Dirty reading
4、 All of the above will do
answer :4
Reference resources :MySQL Innodb Transaction isolation level
The tree description is wrong
1、 Any node of binary search tree x, All items in the left subtree are less than x, All items in the right subtree are greater than x
2、AVL Tree is the height difference between the left and right subtrees of each node 1 Binary search tree of
3、 According to the preface 、 In the following order , A binary tree can be uniquely identified
4、 The red black tree is AVL A variation of a tree , The height difference between its left and right trees may be greater than 1
answer :3
1 The reference of : Binary search tree
2 The reference of : Search tree -- AVLTree 【 Self-balancing binary search tree 】 Principle diagram and example code 
3 The reference of : front 、 in 、 Whether post order traversal can determine a binary tree ? reason ?
4 The reference of : Tree structure series ( Two ): Balanced binary trees 、AVL Trees 、 Red and black trees 
Code running problem 1
function A(x){
this.x = x;
}
A.prototype.x = 1;
function B(x){
this.x = x;
}
B.prototype = new A();
var a = new A(2),b = new B(3);
//console.log(a);
//console.log(b);
delete b.x;
//console.log(b);
console.log(a.x);
console.log(b.x);
answer :
2
undefined
The rookie suddenly found , It seems that this prototype is only used to influence you , Actually, add something to the prototype , Yes new The instance object has no effect , It's just new These things will be added to the prototype of the example !
Code running problem 2
var obj = {
},a = {
a : 1},b = {
b : 2},c = {
c : 3};
obj[a] = 1;
obj[b] = 2;
console.log(obj);
console.log(obj[c]);
answer :
2
Novices here don't understand very much , We can only rely on readers' active communication .
Code running problem 3
var a = 1;
function Fn1(){
var a = 2;
//console.log(this);
//console.log(this.a,a);
console.log(this.a + a);
}
function Fn2(){
var a = 10;
//console.log(this);
Fn1();
}
Fn2();
var Fn3 = function(){
//console.log(this);
this.a = 3;
}
Fn3.prototype = {
a : 4
}
var fn3 = new Fn3();
Fn1.call(fn3);
answer :
3
5
This question examines this Pointed question , If a function is not assigned to a variable , So this It points to window, If assigned, it refers to the assigned variable ; and call Will be able to this Point to fn3 example , The prototype chain here also affects you , It won't change a Value ; And that is The variables in each function will not affect each other , If there is one outside , that The inside of the function will cover the outside !
Part one is about the study of variable scope , Read my blog : Wechat applet project encountered problem 2 : Variable scope ( To continue )| Use data The array in is assigned to the variable b, change b Value , The solution of array change | js The difference between basic types and reference types | Variable naming conflicts
边栏推荐
- 2. Conditional statements of shell script
- Mouse monitor, Paintbrush
- Idea overall font size modification
- Small knowledge of common classes
- 7.shell实用的小工具cut等
- Test plan and test plan
- Storage, computing, distributed Virtualization (collection and sorting is suitable for Xiaobai)
- 8.shell文件处理三剑客之sed
- 使用px2rem不生效
- 6.shell之正则表达式
猜你喜欢

Vs Code connects to the remote jupyter server

微信小程序WxPrase中包含文件无法点击解决

Angr(二)——angr_ctf

Add CONDA virtual environment env to the Jupiter kernel

存储、计算、分布式存储篇(收集整理适合小白)

Supervisor部署(离线部署需要提前下载部署包)

Set up lnmp+discuz Forum

Number theory -- Research on divisor

Attention is all you need paper intensive reading notes transformer

Idea overall font size modification
随机推荐
mongoDB的使用
Angr(五)——angr_ctf
7. Shell practical gadget cut, etc
Vscode latex workshop set xelatex compilation
4.FTP服务配置与原理
[untitled]
Small knowledge of common classes
Number theory --- the greatest common divisor and the least common multiple
11. Iptables firewall
Configuration of static routes (take Huawei ENSP as an example)
Radio and multi selection buttons of swing components
4. FTP service configuration and principle
shortest-unsorted-continuous-subarray
Open virtual private line network load balancing
js 哈希表 02
User preferences
Add CONDA virtual environment env to the Jupiter kernel
VS Code 连接远程 Jupyter 服务器
Multithreading - static proxy mode
使用px2rem不生效