K个一组翻转链表
- May 16, 2020 9:04 PM
- LintCode
- 588
LeetCode 25. K 个一组翻转链表 https://leetcode-cn.com/problems/reverse-nodes-in-k-group/
LintCode 450. K组翻转链表 https://www.lintcode.com/problem/reverse-nodes-in-k-group/
这是一道用常规思路就能解的算法题。目标清晰、题目易懂,不涉及复杂的算法。
按照题目要求,遍历链表,遍历的同时每经过k
个节点就进行一次翻转。需要注意的是,第一次翻转后,记录下整个链表的head
作为返回值。从第二次翻转开始,需要将之前翻转过的最后一个结点与新翻转后的第一个结点相连。
👀️
牛逼
大哥,能不能教我用00.0.1刷小米路由器4?我自己尝试了没有搞好,001版本还没有弄太懂
看样子并没有报错。可以尝试断电重启,然后再试一次。有网友通过这个方法成功了。
小米路由器4telnet无法连接,请问大神有没有办法解决?路由固件已从2.26.175降级为2.26.127,这两个固件都卡在telnet连接上
fly@fly:~/Desktop/Python-3.9.0/OpenWRTInvasion$ python3 remote_command_execution_vulnerability.py Router IP address: 192.168.31.1 stok: f9fc3d2201f28138c3b4b9228f6c4434
router_ip_address: 192.168.31.1 stok: f9fc3d2201f28138c3b4b9228f6c4434
start uploading config file... start exec command... done! Now you can connect to the router using telnet (user: root, password: none) In MacOS, execute in the terminal: telnet 192.168.31.1
fly@fly:~/Desktop/Python-3.9.0/OpenWRTInvasion$ telnet 192.168.31.1 Trying 192.168.31.1... telnet: Unable to connect to remote host: Connection refused