当前位置:网站首页>Linked list 5 - 234 Palindrome linked list
Linked list 5 - 234 Palindrome linked list
2022-06-23 11:57:00 【Artificial intelligence Zeng Xiaojian】

class Solution:
def isPalindrome(self,head:ListNode) -> bool:
vals= []
current_node =head
while current_node is not None:
vals.append(current_node.val)
current_node = current_node.next
return vals ==vals[::-1]class Solution:
def isPalindrome(self,head:ListNode) ->bool:
vals= []
current_node =head
while current_node is not None:
vals.append(current_node.val)
current_node = current_node.next
return vals ==vals[::-1]边栏推荐
- Is there any regulation on the redemption time of financial products?
- Invalid Navicat scheduled task
- 10-- 根据中序遍历和后序遍历,构造二叉树
- 在flinksql中 kafka流表跟mysql 纬度流表做left join,根据I’d做关联,假
- 4K-HDMI光端机1路[email protected] HDMI2.0光端机 HDMI高清视频光端机
- Signature analysis of app x-zse-96 in a Q & a community
- WC statistics are out of date, and every line of cloc code is valid
- 自动化或电气专业必备软件
- [cloud based co creation] overview of the IOT of Huawei cloud HCIA IOT v2.5 training series
- 学习笔记 scrapy 爬虫框架
猜你喜欢

电脑坏了,换了台电脑,装node环境的时候出了问题,报错URL not defined

Use xtradiagram Diagramcontrol for drawing and controlling process graphics

运行时应用自我保护(RASP):应用安全的自我修养

【进程和线程】

汉源高科USB3.0光端机USB工业触摸屏光端机USB3.0光纤延长器USB3.0光纤传输器

使用单调栈解题

六维图剖析:中国建筑集团有限公司企业成长性分析

64路电话+2路千兆以太网64路PCM电话光端机语音电话转光纤

全国进入主汛期,交通运输部:不具备安全运行条件的线路坚决停运!

Meta称英安全法可能“扫描所有私人信息” 或侵犯隐私
随机推荐
Introduction to redis - Chapter 1 - data structures and objects - simple dynamic string (SDS)
简单易懂的软路由刷机使用教程
【云驻共创】华为云HCIA-IoT V2.5培训系列内容之物联网概览
运行时应用自我保护(RASP):应用安全的自我修养
64路电话+2路千兆以太网64路PCM电话光端机语音电话转光纤
【云驻共创】无码时代,软件开发如何走向每个人?
链表5 - 234. 回文链表
Internet miracle - how does Xiaomi make profits
Creating neural networks using tensorflow2
某问答社区App x-zse-96签名分析
[cloud based co creation] overview of the IOT of Huawei cloud HCIA IOT v2.5 training series
电容参数哪里找!?
LinkedList 5-141. 环形链表
Blue Bridge Cup single chip microcomputer (I) -- turn off peripherals and turn off led
Open classes are short videos! Tonight, I will teach you how to realize accurately!
Meta said that the UK security law may "scan all private information" or infringe privacy
蓝桥杯单片机(一)——关闭外设及熄灭LED
切比雪夫不等式证明及应用
Three ways to learn at work
MySQL在一个字段中匹配多个值