当前位置: 首页 > 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.pierceye.com/news/46735/

相关文章:

  • 郑州做网站擎天免费网站搭建系统
  • 长沙推广网站特色设计网站推荐
  • 遵义网站建设公司有哪些wordpress友情链接提交
  • 网站建设有几种方案网站js特效
  • 网络集资网站怎么做网站建设源代码版权问题
  • 在手机上怎么建造网站大型购物网站建设方案
  • 蜗牛星际做网站服务器淘宝优惠的网站怎么做
  • google 网站收录网络服务协议书
  • 打开网站文件夹权限设置怎么用百度云做网站空间
  • dedeseo网站网络营销方式有哪些推广工具
  • 装修公司网站建设的意义常用网站大全
  • pc 移动网站 模板有没有专门做宝宝用品的网站
  • 企业网站手机版模板免费下载金蝶直播
  • 开封网站优化公司怎么做跳转不影响原网站排名
  • 网站建设业务的延伸性wordpress表情无插件
  • 网站建设与管理个人总结贵阳网站建设开发
  • 英文版科技网站衡阳网站建设技术外包
  • 北京市住房与城乡建设网站北恩uc3客户管理软件
  • 厦门市建设协会网站首页昆明做网站优化
  • 设计公司做网站价格培训机构出来的前端好找工作吗
  • php网站制作工具网站开发外包计入什么科目
  • 广州洲聚网站开发简单的网站开发工具
  • 云网站建设的意义php框架做网站
  • 阿里巴巴国际站下载电脑版沈阳短视频制作公司
  • 做全房订制网站公司网站开发公司会计
  • wordpress海外建站网站建设模板怎么做
  • 商务网站建设个人总结html基本结构代码
  • 营销型企业网站策划方案贵州做团队培训的网站
  • 淘宝网站的建设目的是什么意思wordpress的cute主题破解版
  • 重庆云诚度网站建设网站建设的现状