Given a singly linked list, determine if it is a palindrome.
Example 1:
Example 2:
Follow up:
Could you do it in O(n) time and O(1) space?
题解:
比较主流的解法是找到链表中点,然后翻转后半部分,再判断前半部分和后半部分是否一致。
Given a singly linked list, determine if it is a palindrome.
Example 1:
Example 2:
Follow up:
Could you do it in O(n) time and O(1) space?
题解:
比较主流的解法是找到链表中点,然后翻转后半部分,再判断前半部分和后半部分是否一致。
【LeetCode】39. 组合总和
【LeetCode】705. 设计哈希集合
PostgreSQL 安装并初始化PostgreSQL安装postgresql-serveryum install postgresql-server postgresql-contrib检查安装所在路劲[root@172-12-0-100 ~]# rpm -ql postgresql-server | grep setup/usr/bin/postgresql-setup初始化数据库postgr
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M