回文链表-leetcode(234)
摘要:
回文链表 回文链表-LeetCode(234) 请判断一个链表是否为回文链表 方法一 链表的值转换到数组中 将数组均分成俩个小数组 逆序其中一个数组,然后比较俩个数组对应下标的值是否相同 var isPalindrome = function(head) { var arr = [] while ( 阅读全文
posted @ 2020-10-23 17:07 尘光 阅读(94) 评论(0) 推荐(0)
posted @ 2020-10-23 17:07 尘光 阅读(94) 评论(0) 推荐(0)