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

建立销售型网站美容网站建设一个多少钱

建立销售型网站,美容网站建设一个多少钱,企业传统网站开发实例,小米软件开发工程师待遇List相关操作 1 链表二分 目标#xff1a; #xff08;1#xff09;对于偶数节点#xff0c;正好对半分#xff1b; #xff08;2#xff09;对于奇数节点#xff0c;前 后 1 #xff08;3#xff09;断开链表#xff0c;方便后期合并 // 使用快慢指针完成中点…List相关操作 1 链表二分 目标 1对于偶数节点正好对半分 2对于奇数节点前 后 1 3断开链表方便后期合并 // 使用快慢指针完成中点拆分 ListNode *SplitList(ListNode *head) {ListNode *slow{head};ListNode *fast{head};while (fast-next ! nullptr fast-next-next ! nullptr) {slow slow-next;fast fast-next-next;}ListNode *mid slow-next;slow-next nullptr;return mid; }2 链表合并 ListNode *MergeList(ListNode *head1, ListNode *head2) {ListNode dummy{};ListNode *cur dummy;while (head1 ! nullptr head2 ! nullptr) {if (head1-val head2-val) {cur-next head1;head1 head1-next;} else {cur-next head2;head2 head2-next;}cur cur-next;}cur-next (head1 ! nullptr) ? head1 : head2;return dummy.next; }3 链表排序 ListNode* sortList(ListNode* head) {// 题目进阶要求 nlgn 希尔/归并/快速/堆if (head nullptr || head-next nullptr) {return head;}ListNode *head2 SplitList(head);head sortList(head);head2 sortList(head2);return MergeList(head, head2); }4 多链表合并 ListNode* mergeKLists(vectorListNode* lists) {auto cmp [](const ListNode *lhs, const ListNode *rhs) {return lhs-val rhs-val;};// 通过优先级队列进行排序并将取出的后续节点继续插入priority_queueListNode *, vectorListNode *, decltype(cmp) pq{};for (auto head : lists) {if (head ! nullptr) {pq.push(head);}}ListNode dummy{};ListNode *cur dummy;while (!pq.empty()) {// 取最小ListNode *node pq.top();pq.pop();if (node-next ! nullptr) {pq.push(node-next);}cur-next node;cur node;}return dummy.next; }
http://www.hkea.cn/news/14436071/

相关文章:

  • wordpress tag 优化企业seo网站推广公司
  • 毕业设计网站做啥网站开发与软件开发的异同
  • 网站建设頰算网络运维工程师是干什么的
  • 发布网站需要多大空间WordPress自定义icon
  • 网站建设公司有哪些比较知名的人才招聘网站怎么做
  • 做网站赚钱的案例广西电力工程建设公司网站
  • 网站建设报价 福州蓬安网站建设
  • 大连嘉良建设有限公司网站怎么做免费公司网站
  • 视频网站建设 方案设计师用什么软件
  • 受欢迎的昆明网站建设凡科网站空间慢
  • 做电脑租赁网站免费的那种app
  • 一站式做网站哪家好常州网站优化公司
  • 福建莆田网站开发无锡网站优化建站
  • 换网站了吗nas服务器可以做网站吗
  • 设计网站建设价格樟木头建网站的
  • 做网站犯法了 程序员有责任吗升级不了wordpress
  • 看网站的关键词WordPress分享无法显示
  • 虚拟主机对网站seo有哪些影响自适应网站建站价格
  • 网站营销推广策划方案不让网站在手机怎么做
  • 公司网站有什么作用wordpress商店模板
  • 在线玩网页游戏h5网站大全推广自己的网站
  • 苏州市建设局老网站qq网页版登录入口手机版
  • 深圳企业推广网站网站开发的软硬件环境
  • 基于js原生的新闻类静态网站建设注册一家小规模公司多少钱
  • 做国际贸易都用什么网站手机上如何申请营业执照
  • 网站上线方案系统的超级宗门
  • 专做婚宴用酒是网站银行软件开发工资一般多少
  • 海淀企业型网站建设网络设计网站
  • 一个完整的网站 技术制作网页填数据
  • 服务器租用网站模板网络营销培训机构排名