Leetcode共5篇
leetcode142.Linked List Cycle II-NESXO程序猿社区

leetcode142.Linked List Cycle II

Problem DescriptionGiven a linked list, return the node where the cycle begins. If there is no cycle, return null.There is a cycle in a linked list if there is some node in the li...
灰太狼的头像-NESXO程序猿社区钻石会员灰太狼8个月前
23859
leetcode19.Remove Nth Node From End of List-NESXO程序猿社区

leetcode19.Remove Nth Node From End of List

Problem DescriptionGiven the head of a linked list, remove the nth node from the end of the list and return its head.ApproachTo remove the nth node from the end of a linked list, w...
灰太狼的头像-NESXO程序猿社区钻石会员灰太狼8个月前
19589
leetcode206.Reverse Linked List-NESXO程序猿社区

leetcode206.Reverse Linked List

Problem DescriptionGiven the head of a singly linked list, reverse the list, and return the reversed list.ApproachTo reverse a linked list, we can iteratively change the direction ...
灰太狼的头像-NESXO程序猿社区钻石会员灰太狼8个月前
14930
leetcode203.Remove Linked List Elements-NESXO程序猿社区

leetcode203.Remove Linked List Elements

Problem DescriptionGiven the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head.ApproachThe key to ...
灰太狼的头像-NESXO程序猿社区钻石会员灰太狼8个月前
17179
8. 字符串转换整数 (atoi)-NESXO程序猿社区

8. 字符串转换整数 (atoi)

题目描述 JAVA 解法 class Solution { public int myAtoi(String s) { // 将传进来的字符串转换为字符数组 char[] chars = s.toCharArray(); // 获取字符数组的长度 int n = chars.length; // ...
站长的头像-NESXO程序猿社区钻石会员站长2年前
75686