![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
链表题
以强大回敬热爱
这个作者很懒,什么都没留下…
展开
-
链表一些题(II)
1.链表回文结构/*struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) {}};*/class PalindromeList {public: bool chkPalindrome(ListNode* A) { // write code here if(A==nullptr&&A->nex原创 2021-08-17 23:27:41 · 70 阅读 · 0 评论 -
数据结构的一些链表题目(I)
1.移除链表元素解:/** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */struct ListNode* removeElements(struct ListNode* head, int val){ //思想:双指针struct ListNode*prev,*cur;prev=NULL;cur=he原创 2021-08-17 21:37:11 · 75 阅读 · 0 评论