当前位置:网站首页>Print linked list in reverse order
Print linked list in reverse order
2022-07-26 05:54:00 【Study and pursue high efficiency】

The code is as follows
public void reversePrintList(ListNode head) {
if(head == null) {
return;
}
if(head.next == null) {
System.out.print(head.val+" ");
return;
}
printList(head.next);
System.out.print(head.val+" ");
}
边栏推荐
猜你喜欢

Balanced binary tree (AVL)~

Using easyexcel to import tables to realize batch insertion of xlsx files ----- MySQL of Linux

Benji Banas launched the second season of earn while playing bonus activities, supporting the use of multiple Benji passes!

Redis official visualization tool, with high appearance value and powerful functions!

Redis transaction

Redis主从复制

Redis持久化-RDB

中文文本纠错任务简介

CANoe-XML在Test Modules中的应用

光量子里程碑:6分钟内解决3854个变量问题
随机推荐
Balanced binary tree (AVL)~
[cloud native] introduction and use of feign of microservices
Interview questions for software testing is a collection of interview questions for senior test engineers, which is exclusive to the whole network
Servlet filter details
MBA-day28 数的概念-练习题
对接微信支付(二)统一下单API
Redis主从复制
Kingbasees SQL language reference manual of Jincang database (6. Expression)
Kingbasees SQL language reference manual of Jincang database (11. SQL statement: abort to alter index)
Unity Profiler
How are masters refined?
二叉排序树(BST) ~
我又发现了超赞的软硬件项目,全部开源
Binary sort tree (BST)~
Redis发布订阅
The idea YML file code does not prompt the solution
Select sort / insert sort / bubble sort
1.12 basis of Web Development
Talking about the practice of software defect management
How to view the container name in pod