![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode链表题目
wokaodashu
日常写Bug
展开
-
leetCode_Add to List 206. Reverse Linked List
总觉得犯得错误低级到不行 这次的题目很简单,给你一个链表的头指针(没有头节点),逆置这个链表,例如把 1->2->3->4 变成 4->3->2->1原创 2017-10-17 13:14:39 · 252 阅读 · 0 评论 -
leetCode_234. Palindrome Linked List(判断是否为回文串)
Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space? 题目意思就是给你一个链表,判断是否为回文串。 一开始的思路就是把链表的节点值用vector存起来,再首++尾--进行判断 代码如下 /** * De原创 2017-10-23 18:50:21 · 186 阅读 · 0 评论 -
leetCode_237. Delete Node in a Linked List
这是刷题的第一篇博客,有些话写在前面吧: 最近开始在leetCode上刷题巩固自己的数据结构知识,以及学习一些算法(提高自己能力以及为以后面试做准备),以前总觉得只要完成了任务就好,想法真是太天真,所以最近也开始关注起算法的效率问题,LeetCode是个不错的选择,还能练练阅读理解(毕竟英语渣),好,那就在博客里写写自己犯二以及有价值的题目吧! 题目描述: Write a funct原创 2017-10-16 00:00:57 · 167 阅读 · 0 评论 -
leetCode_25. Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to the length of the linked list. If the number o原创 2017-10-26 12:54:18 · 229 阅读 · 0 评论