DIFF.BLOG
New
Following
Discover
Jobs
More
Suggest a blog
Upvotes plugin
Report bug
Contact
About
Sign up  
【Java】LeetCode题答-203移除链表元素
1
·
孤桜懶契
·
June 26, 2021, 7:25 p.m.
Summary
LeetCood题目题答1(完整代码)123456789101112131415161718192021222324252627282930313233343536/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = val; } * ListNode(int val, ListNode next) { this.val = val; this.next = next; } * } */class Solution { public ListNode removeElements(ListNode head, int val) { while(head != null && head.val == val){ ListNode delNode = head; ...
Read full post on gylq.gitee.io →
Submit
AUTHOR
RECENT POSTS FROM THE AUTHOR