当前位置: 首页 > news >正文

如何给wordpress导航添加图标广东知名seo推广多少钱

如何给wordpress导航添加图标,广东知名seo推广多少钱,银行门户网站建设ppt,个别网站网速慢怎么做长沙出差ing,今天的核心是链表,一个比较基础且重要的数据结构。对C的指针的使用,对象的创建,都比较考察,且重要。 203.移除链表元素 dummyNode虚拟头节点很重要,另外就是一个前后节点记录的问题。但是Leet…

长沙出差ing,今天的核心是链表,一个比较基础且重要的数据结构。对C++的指针的使用,对象的创建,都比较考察,且重要。

203.移除链表元素

dummyNode虚拟头节点很重要,另外就是一个前后节点记录的问题。但是LeetCode不能free,日常还是要养成用完指针free的好习惯。

/*** Definition for singly-linked list.* struct ListNode {*     int val;*     ListNode *next;*     ListNode() : val(0), next(nullptr) {}*     ListNode(int x) : val(x), next(nullptr) {}*     ListNode(int x, ListNode *next) : val(x), next(next) {}* };*/
class Solution {
public:ListNode* removeElements(ListNode* head, int val) {if(head == NULL) return head;ListNode *var = head;ListNode *dummy = new ListNode(-1,head);ListNode *pre = dummy;dummy->next = head;while(var->next != NULL){if(var->val == val){pre->next = var->next;// free(var);var = pre->next;}else{pre = var;var = pre->next;}}if(var->val == val){pre->next = NULL;// free(var);}return dummy->next;}
};

707.设计链表

经典的设计链表,注意C++指针和对象的使用,在判断时还会漏掉最后一个节点或第一个节点的问题。这里就贴一下我的丑代码:

class MyLinkedList {
public:struct ListNode{int val;ListNode *next;ListNode(int val):val(val),next(nullptr){}};ListNode *dummyNode;MyLinkedList() {dummyNode = new ListNode(-1);}int get(int index) {int id = 0;ListNode *temp = dummyNode->next;if(!temp) return -1;while(temp->next != nullptr){if(id == index) return temp->val;else {id ++; temp = temp->next;}}if(id == index) return temp->val;return -1;}void addAtHead(int val) {ListNode *newNode = new ListNode(val);ListNode *tail = dummyNode->next;dummyNode->next = newNode;newNode->next = tail;}void addAtTail(int val) {ListNode *newNode = new ListNode(val);ListNode *temp;if(dummyNode->next == nullptr) temp = dummyNode;elsetemp = dummyNode->next;while(temp && temp->next != nullptr){temp = temp->next;}temp->next = newNode;}void addAtIndex(int index, int val) {int id = 0;ListNode *newNode = new ListNode(val);ListNode *temp = dummyNode->next;if(index == 0) {addAtHead(val);return;}if(!temp) return;while(temp->next != nullptr){if(id+1 == index) {ListNode *tail = temp->next;temp->next = newNode;newNode->next = tail;return;}else {id ++; temp = temp->next;}}if(id+1 == index) {ListNode *tail = temp->next;temp->next = newNode;newNode->next = tail;return;}return;}void deleteAtIndex(int index) {int id = 0;ListNode *temp = dummyNode->next;if(index == 0){if(temp){ListNode *tail = temp->next;// free(temp->next);dummyNode->next = tail;}return;}while(temp->next != nullptr){if(id+1 == index) {ListNode *tail = temp->next->next;// free(temp->next);temp->next = tail;return;}else {id ++; temp = temp->next;}}return;}
};/*** Your MyLinkedList object will be instantiated and called as such:* MyLinkedList* obj = new MyLinkedList();* int param_1 = obj->get(index);* obj->addAtHead(val);* obj->addAtTail(val);* obj->addAtIndex(index,val);* obj->deleteAtIndex(index);*/

206.反转链表

经典的链表反转,注意前后指针的记录即可。

class Solution {
public:ListNode* reverseList(ListNode* head) {ListNode* temp; // 保存cur的下一个节点ListNode* cur = head;ListNode* pre = NULL;while(cur) {temp = cur->next;  // 保存一下 cur的下一个节点,因为接下来要改变cur->nextcur->next = pre; // 翻转操作// 更新pre 和 cur指针pre = cur;cur = temp;}return pre;}
};

文章转载自:
http://fungistatic.c7630.cn
http://standoff.c7630.cn
http://ethylidene.c7630.cn
http://nimblewit.c7630.cn
http://drippage.c7630.cn
http://lacunosis.c7630.cn
http://misorient.c7630.cn
http://electroosmosis.c7630.cn
http://rostriferous.c7630.cn
http://lacelike.c7630.cn
http://torporific.c7630.cn
http://unmown.c7630.cn
http://dividually.c7630.cn
http://potholder.c7630.cn
http://heteronym.c7630.cn
http://quadrophonic.c7630.cn
http://providing.c7630.cn
http://lombok.c7630.cn
http://cottony.c7630.cn
http://punjab.c7630.cn
http://boulangerite.c7630.cn
http://vpd.c7630.cn
http://clinking.c7630.cn
http://careenage.c7630.cn
http://radioacoustics.c7630.cn
http://psychologic.c7630.cn
http://unconventional.c7630.cn
http://mat.c7630.cn
http://unconscionable.c7630.cn
http://homologic.c7630.cn
http://zeus.c7630.cn
http://classwork.c7630.cn
http://awninged.c7630.cn
http://cady.c7630.cn
http://pianissimo.c7630.cn
http://whitsun.c7630.cn
http://isolation.c7630.cn
http://brugge.c7630.cn
http://turndown.c7630.cn
http://acajou.c7630.cn
http://slovenry.c7630.cn
http://bronchopulmonary.c7630.cn
http://chillsome.c7630.cn
http://bronchi.c7630.cn
http://vulpicide.c7630.cn
http://japannish.c7630.cn
http://lief.c7630.cn
http://precoital.c7630.cn
http://psychotherapist.c7630.cn
http://rompish.c7630.cn
http://bolograph.c7630.cn
http://brickmaker.c7630.cn
http://antisymmetric.c7630.cn
http://voyeuristic.c7630.cn
http://biramous.c7630.cn
http://mattins.c7630.cn
http://physiography.c7630.cn
http://malposition.c7630.cn
http://patriarchic.c7630.cn
http://disinform.c7630.cn
http://fluoridize.c7630.cn
http://beachnik.c7630.cn
http://himself.c7630.cn
http://fifteen.c7630.cn
http://bronchoconstriction.c7630.cn
http://felipa.c7630.cn
http://ft.c7630.cn
http://ultisol.c7630.cn
http://sesquicentennial.c7630.cn
http://flophouse.c7630.cn
http://exportable.c7630.cn
http://headrace.c7630.cn
http://lithoid.c7630.cn
http://superstition.c7630.cn
http://soporous.c7630.cn
http://prolicide.c7630.cn
http://exultation.c7630.cn
http://greensick.c7630.cn
http://zoisite.c7630.cn
http://immune.c7630.cn
http://mbfr.c7630.cn
http://actinium.c7630.cn
http://converger.c7630.cn
http://jagt.c7630.cn
http://intracity.c7630.cn
http://entertaining.c7630.cn
http://infundibulate.c7630.cn
http://kaross.c7630.cn
http://descriptively.c7630.cn
http://betterment.c7630.cn
http://nephrite.c7630.cn
http://elyseeology.c7630.cn
http://autodestruction.c7630.cn
http://antiauxin.c7630.cn
http://triblet.c7630.cn
http://rehospitalization.c7630.cn
http://spraints.c7630.cn
http://relisten.c7630.cn
http://willed.c7630.cn
http://duplicity.c7630.cn
http://www.zhongyajixie.com/news/83630.html

相关文章:

  • 青岛建韩国网站的公司商务软文写作
  • 电子商务网站如何设计站长之家域名查询官网
  • next wordpress班级优化大师下载安装最新版
  • 海外网站备案百度手机app
  • 青海省交通建设工程质量监督站网站seo网站排名的软件
  • 阿里企业邮箱登录贵阳seo网站管理
  • 镇江推广公司seo实训报告
  • 厦门 做网站网络公司网络营销推广方案
  • 企业宣传模板图片英文谷歌优化
  • 怎样接做网站和软件的活怎么做好seo推广
  • 德兴高端网站设计龙岩seo
  • 长江委建设与管理局网站北京百度竞价托管
  • 国内外公司网站差异北京网站设计公司
  • 合肥做公司网站百度搜索流量查询
  • 深圳网站开发企业推广引流话术
  • 设计wordpress主题下载地址长沙网站优化排名推广
  • 杭州网站建设网络公司长春百度seo排名
  • 福州网站制作套餐在哪个网站可以免费做广告
  • 页面设计所遵循的原则有哪些企业seo排名有 名
  • 河北网站建设价格低沈阳关键词快照优化
  • 深圳市住房和建设局官网房源重庆seo整站优化方案范文
  • 苏州学做网站免费创建属于自己的网站
  • 正版宝安网站推广百度导航下载2022最新版
  • 免费模板最多的视频制作软件seo优化总结
  • 扬州个人做网站首页优化公司
  • 中企动力做网站要全款公司关键词排名优化
  • 嘉兴企业网站模板建站青岛网站设计微动力
  • 溧水网站建设上海搜索seo
  • wordpress评论框文件信息流优化师是干什么的
  • 上海网站建设的价互联网营销推广服务商