跳至主要內容

BM13 判断一个链表是否为回文结构

微信公众号:储凡September 16, 2023Less than 1 minute

BM13 判断一个链表是否为回文结构

题目链接

题目描述

反转链表.png
反转链表.png

刷题思路

代码实现

/*
 * function ListNode(x){
 *   this.val = x;
 *   this.next = null;
 * }
 */
/**
 *
 * @param head ListNode类 the head
 * @return bool布尔型
 */
export function isPail(head) {
  console.log(head)
}

一些建议

上次编辑于: 7/29/2024, 3:43:01 PM
贡献者: 142vip.cn,chufan