LeetCode
林尽处听雨眠
如果你眼睛看到的前方是热闹的,那这个方向不一定是好方向
人生最难的就是在热爱和生计之间做选择
愿每个人这一生
既对得起梦想又担得起生活的责任
这座城市没有一盏灯为你点亮,你只有燃耗自己才能照亮前进的道路。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode每日一题~链表是否有环
LeetCode每日一题~链表是否有环 141. Linked List Cycle Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the ne原创 2022-04-26 10:29:20 · 800 阅读 · 0 评论 -
LeetCode每日一题之反转链表
LeetCode每日一题 刷题记录。。 206. Reverse Linked List Given the head of a singly linked list, reverse the list, and return the reversed list. 题目大意 链表反转 解题思路1 头插法反转 在遍历链表时,将当前节点的 \textit{next}next 指针改为指向前一个节点。由于节点没有引用其前一个节点,因此必须事先存储其前一个节点。在更改引用之前,还需要存储后一个节点。最后返回新的头原创 2022-04-25 20:12:41 · 750 阅读 · 0 评论 -
LeetCode---剑指 Offer 20. 表示数值的字符串
题目描述 请实现一个函数用来判断字符串是否表示数值(包括整数和小数)。例如,字符串"+100"、“5e2”、"-123"、“3.1416”、"-1E-16"、“0123"都表示数值,但"12e”、“1a3.14”、“1.2.3”、"±5"及"12e+5.4"都不是。 原题 解题思路 本题使用有限状态自动机。根据字符类型和合法数值的特点,先定义状态,再画出状态转移图,最后编写代码即可。 字符类型: 空格 「 」、数字「 0—90—9 」 、正负号 「 ±+− 」 、小数点 「 … 」 、幂符号 「 eEeE原创 2020-09-02 17:56:26 · 142 阅读 · 0 评论
分享