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

张掖市建设局网站wordpress被恶意登录

张掖市建设局网站,wordpress被恶意登录,网站建设+公司,wordpress选中改变字体颜色方法一#xff1a;暴力求解 1️⃣遍历原链表#xff0c;复制节点尾插 2️⃣更新random#xff0c;原链表中的random对应第几个节点则复制链表中的random就对应第几个 #x1f4d6;Note 不能通过节点中的val判断random的指向#xff0c;因为链表中可能存在两个val相等的节点… 方法一暴力求解 1️⃣遍历原链表复制节点尾插 2️⃣更新random原链表中的random对应第几个节点则复制链表中的random就对应第几个 Note 不能通过节点中的val判断random的指向因为链表中可能存在两个val相等的节点 //创建节点 struct Node* BuyNode(int x) {struct Node* newnode (struct Node*)malloc(sizeof(struct Node));newnode-val x;newnode-next NULL;return newnode; }//找到random对应的节点是第几个 int FindRandom(struct Node* head, struct Node* random) {int count 1;while (head){if (head random){return count;}else {count;head head-next;}}return count; }struct Node* copyRandomList(struct Node* head) {struct Node* guard (struct Node*)malloc(sizeof(struct Node));guard-next NULL;struct Node* tail guard;struct Node* cur head;//复制原链表while (cur){struct Node* newnode BuyNode(cur-val);tail-next newnode;tail tail-next;cur cur-next;}//tail和cur都指向新链表的头tail guard-next;struct Node* tmp head;//更新randomwhile (tail){//在原链表这种判断random指向的节点是第几个int count FindRandom(head, tmp-random);tmp tmp-next;//更新复制链表中的randomcur guard-next;while (count--){tail-random cur;if (cur){cur cur-next;}}tail tail-next;}struct Node* newhead guard-next;free(guard);return newhead;} 方法二 1️⃣拷贝原节点并链接在原节点之后 2️⃣更新拷贝节点中的random 拷贝节点中的random指向的是原节点中random指向节点的下一个节点 3️⃣将拷贝的节点解下来构成新的复制链表 struct Node* copyRandomList(struct Node* head) {struct Node* cur head;struct Node* copy NULL;//拷贝原节点并链接在原节点之后while (cur){copy (struct Node*)malloc(sizeof(struct Node));copy-val cur-val;copy-next cur-next;cur-next copy;cur cur-next-next;}//更新拷贝节点的randomcur head;while (cur){copy cur-next;if (cur-random){copy-random cur-random-next;}else{copy-random NULL;}cur cur-next-next;}//将所有拷贝节点解下来构成新链表并恢复原链表结构cur head;struct Node* copyhead, *copytail;copyhead copytail NULL;while (cur){copy cur-next;//取节点尾插if (copytail NULL){copyhead copytail copy;}else{copytail-next copy;copytail copytail-next;}//恢复原链表cur-next copy-next;cur copy-next;}return copyhead; }
http://www.zqtcl.cn/news/46735/

相关文章:

  • 买网站服务器吗企业网站建设合同书.doc
  • 视频网站建设的背景简介360浏览器显示2345网址导航
  • 手机网站 好处有哪些静态网站
  • 东莞网站建设在哪里wordpress怎么实现会员登录
  • 网站排名第一手机上如何做mv视频网站
  • 用 php网站建设打出一首古诗如何重新运行wordpress
  • flash优秀网站建设销售网站的意义
  • 湄潭建设局官方网站wordpress主题插件下载
  • 免费建一个自己的网站如何自己做跨境电商
  • flash网站与html5房产网站排名
  • 郑州企业网站优化多少钱wordpress怎么添加icp
  • 网站建设 学习什么wordpress建站以后
  • 东莞网站建设服务有什么用小孩做阅读的网站有哪些
  • 沈阳建网站电商网站目录创建下载链接
  • 网站页面策划电子商务网站建设资讯
  • 怎样做才能发布你的网站外国做家具的网站
  • 中山网络公司网站做网站公司大连
  • 无为住建设局网站百度指数移动版
  • 彩票网站自己可以做吗网站建设需要会什么
  • 外贸soho建网站公司做网站的费用怎么做账
  • 专业的营销型网站企业文化怎样做网络推广效果好
  • 在国外做电商网站中国网站建设银行-个人客户
  • 关于网站建设议案智慧校园学生端登录平台
  • oppo官方网站ppt模板免费下载 动态
  • 怎样做企业手机网站首页产品开发设计流程图
  • 上海网站建设找站霸网络免费网站
  • 济南智能网站建设电话贪玩传奇世界网页版
  • 广州做网站平台怎样做网站别人能访问
  • 二手交易网站怎么做宝塔设置加速wordpress站点
  • 快站优惠券去哪里找秀山微信网站建设