当前位置:网站首页>JS construction linked list
JS construction linked list
2022-07-25 02:54:00 【One is dozing】
Master the way of constructing linked list , It is very convenient to debug code on the local editor ~
The way 1:
const l1 = {
val: 1,
next: {
val: 2,
next: {
val: 4,
next: null
},
},
};
The way 2:
function ListNode(val){
this.val = val;
this.next = null;
}
// 4->5->1->9
var node1 = new ListNode(4);
var node2 = new ListNode(5);
var node3 = new ListNode(1);
var node4 = new ListNode(9);
node1.next = node2;
node2.next = node3;
node3.next = node4;
边栏推荐
- Execution methods with static code blocks and child and parent classes
- If there is a segment in the encryption field, are you "bronze" or "King"?
- Daily three questions 7.15
- Get to know string thoroughly
- What are you working for? Don't give up is our only choice, come on, everyone
- DLL load failed: the page file is too small to complete the operation
- Vite dynamically loads static resource pictures, and fixes the 404 problem of pictures after packaging.
- Tp5.1 login configuration method of whether to login public functions (complete login case)
- "Introduction to interface testing" punch in to learn day07: websocket interface: how to test a completely unfamiliar protocol interface?
- Work arrangement of generator set
猜你喜欢

Request and response

Flink's study notes

YouTube Download and (batch) Download

Strategy mode, just read one article

UDP message structure and precautions

Dynamic programming -- Digital DP

Wechat sports field reservation of the finished works of the applet graduation project (6) opening defense ppt
![[TinyML]EfficientFormer:Vision Transformers at MobileNet Speed](/img/e7/b9ecf49721e6304a2d8ca824b64458.png)
[TinyML]EfficientFormer:Vision Transformers at MobileNet Speed

Mgre.hdlc.ppp.chap.nat comprehensive experiment

B2B e-commerce trading platform of heavy metal industry: breaking the state of data isolation and improving the benefits of heavy metal industry
随机推荐
File file name change
[jailhouse article] certify the uncertified rewards assessment of virtualization for mixed criticality
Actual combat in ThreadLocal project
Go multiplexing
Threat report in June: new bank malware malibot poses a threat to mobile banking users
JS written test question -- prototype, new, this comprehensive question
Mid year summary and personal feelings
6.0 cancellation of member registration verification code
What are you working for? Don't give up is our only choice, come on, everyone
Several dpdk control frameworks
Redis unauthorized access vulnerability recurrence (www.hetianlab.com)
Rolling division, Young's matrix and three-step flip
Learning record Xi
Tp5.1 initialize initialization method (not \u initialize)
The latest interview questions and analysis of software testing in 2022
StrError and PERROR
【C】 Advanced knowledge of file operation
Read and upgrade st-link chip information and SWD burning media through STM32 stlink utility tool
Learning record 12
English grammar_ Reflexive pronoun