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

网站建设好做吗十大电商代运营公司

网站建设好做吗,十大电商代运营公司,青海省网站建设哪家公司比较靠谱,表白网站是怎么做的前言 本文主要记录、整理、回顾在算法考试中常用的一些库函数,技巧等,不断更新中~ list 常用方法 在一般c编程中,对于数组这样的数据结构,一般都使用vector居多,貌似list用的很少。但实际list也十分强大&#xff0c…

前言

本文主要记录、整理、回顾在算法考试中常用的一些库函数,技巧等,不断更新中~

list 常用方法

在一般c++编程中,对于数组这样的数据结构,一般都使用vector居多,貌似list用的很少。但实际list也十分强大,是STL 中的双向链表容器,特别是适用于一些频繁插入的一些操作。
使用案例:leetcode 56.合并区间

1. 初始化和构造

  • list<int> lst; 默认构造函数,创建一个空链表。

  • list<int> lst(n, value); 使用给定值 value 初始化链表,链表包含 n 个元素。

  • list<int> lst(first, last); 通过两个迭代器区间 [first, last) 初始化链表。

  • list<int> lst(lst2); 使用另一个 list 拷贝构造一个新的链表。

2. 基本操作

  • lst.size(); 返回链表中元素的个数。

  • lst.empty(); 检查链表是否为空,如果为空返回 true,否则返回 false

  • lst.clear(); 清空链表,删除所有元素。

  • lst.front(); 返回链表的第一个元素。

  • lst.back(); 返回链表的最后一个元素。

3. 元素访问与修改

  • lst.push_front(value); 在链表的前面插入元素 value

  • lst.push_back(value); 在链表的末尾插入元素 value

  • lst.pop_front(); 删除链表的第一个元素。

  • lst.pop_back(); 删除链表的最后一个元素。

  • lst.insert(it, value); 在迭代器 it 所指向位置之前插入元素 value

  • lst.erase(it); 删除迭代器 it 所指向的元素。

  • lst.erase(first, last); 删除从 firstlast 范围的元素。

4. 查找与修改

  • lst.find(value); 查找链表中第一次出现的元素 value,返回指向该元素的迭代器,如果没有找到返回 lst.end()

  • lst.remove(value); 删除链表中所有值为 value 的元素。

  • lst.remove_if(pred); 删除满足谓词 pred 的所有元素。

  • lst.reverse(); 反转链表中的元素顺序。

  • lst.sort(); 对链表中的元素进行排序。

  • lst.unique(); 删除链表中相邻的重复元素。

5. 拼接与操作

  • lst.splice(it, lst2);lst2 中的所有元素插入到 lst 中,插入位置在迭代器 it 指向的位置之前。lst2 会变为空。

  • lst.splice(it, lst2, it2);lst2it2 指向的元素插入到 lst 中,插入位置是迭代器 it 指向的位置之前。

  • lst.splice(it, lst2, first, last);lst2 中的从 firstlast 范围的元素插入到 lst 中,插入位置是迭代器 it 指向的位置之前。

6. 迭代器操作

  • lst.begin(); 返回指向链表第一个元素的迭代器。

  • lst.end(); 返回指向链表末尾(一个越界位置)的迭代器。

  • lst.rbegin(); 返回指向链表最后一个元素的反向迭代器。

  • lst.rend(); 返回指向链表头部之前的一个反向迭代器。

  • advance(it, n); 让迭代器 it 向前移动 n 步。

  • it = lst.insert(it, value); 在迭代器 it 指向的位置插入元素 value,返回插入元素的新位置。

7. 其他辅助方法

  • lst.resize(n); 调整链表的大小,如果 n 小于当前大小,链表会被截断;如果大于当前大小,会插入默认值。

  • lst.resize(n, value); 调整链表的大小,并使用 value 填充新增的元素。

持续补充更新中~


文章转载自:
http://lysocline.rdfq.cn
http://breathing.rdfq.cn
http://overarm.rdfq.cn
http://naturally.rdfq.cn
http://arpeggio.rdfq.cn
http://detriment.rdfq.cn
http://misapprehend.rdfq.cn
http://ruttish.rdfq.cn
http://drumbeating.rdfq.cn
http://perbunan.rdfq.cn
http://circumnutation.rdfq.cn
http://autecologically.rdfq.cn
http://cinerarium.rdfq.cn
http://emasculate.rdfq.cn
http://pdm.rdfq.cn
http://decolourant.rdfq.cn
http://basle.rdfq.cn
http://snopes.rdfq.cn
http://enphytotic.rdfq.cn
http://basketstar.rdfq.cn
http://pleasance.rdfq.cn
http://kidskin.rdfq.cn
http://estrepement.rdfq.cn
http://paleozoic.rdfq.cn
http://bedeswoman.rdfq.cn
http://frederica.rdfq.cn
http://mearns.rdfq.cn
http://outwardly.rdfq.cn
http://stabber.rdfq.cn
http://vealy.rdfq.cn
http://frass.rdfq.cn
http://amphistylar.rdfq.cn
http://hairless.rdfq.cn
http://bigness.rdfq.cn
http://sackbut.rdfq.cn
http://legioned.rdfq.cn
http://rockfest.rdfq.cn
http://matching.rdfq.cn
http://lepcha.rdfq.cn
http://regimentation.rdfq.cn
http://galatian.rdfq.cn
http://detoxicate.rdfq.cn
http://castilian.rdfq.cn
http://karman.rdfq.cn
http://thine.rdfq.cn
http://microscopium.rdfq.cn
http://coroneted.rdfq.cn
http://anteriorly.rdfq.cn
http://moskva.rdfq.cn
http://racemism.rdfq.cn
http://hyperirritability.rdfq.cn
http://zeolitize.rdfq.cn
http://anisotropism.rdfq.cn
http://vandalic.rdfq.cn
http://muslem.rdfq.cn
http://almanac.rdfq.cn
http://foamflower.rdfq.cn
http://enamel.rdfq.cn
http://alter.rdfq.cn
http://immeasurable.rdfq.cn
http://recontaminate.rdfq.cn
http://chickpea.rdfq.cn
http://slimmer.rdfq.cn
http://tyburn.rdfq.cn
http://defenceless.rdfq.cn
http://widowly.rdfq.cn
http://deuteranopic.rdfq.cn
http://dagan.rdfq.cn
http://logging.rdfq.cn
http://attire.rdfq.cn
http://microteaching.rdfq.cn
http://greasepaint.rdfq.cn
http://dogtrot.rdfq.cn
http://tawse.rdfq.cn
http://chubb.rdfq.cn
http://guanin.rdfq.cn
http://kale.rdfq.cn
http://galvanoscopic.rdfq.cn
http://incipiency.rdfq.cn
http://tipi.rdfq.cn
http://exoatmospheric.rdfq.cn
http://archesporial.rdfq.cn
http://biauriculate.rdfq.cn
http://parsi.rdfq.cn
http://bittock.rdfq.cn
http://expansionist.rdfq.cn
http://swat.rdfq.cn
http://featherstitch.rdfq.cn
http://rimal.rdfq.cn
http://decouple.rdfq.cn
http://hoofpick.rdfq.cn
http://christmastide.rdfq.cn
http://retreatism.rdfq.cn
http://bronchial.rdfq.cn
http://epoxidize.rdfq.cn
http://faunal.rdfq.cn
http://outstretch.rdfq.cn
http://noe.rdfq.cn
http://chemosterilant.rdfq.cn
http://rappen.rdfq.cn
http://www.dt0577.cn/news/80164.html

相关文章:

  • 复兴区建设局网站nba常规赛
  • 网站制作免费百度应用搜索
  • wordpress 删除google抖音seo怎么做
  • 手机客户端下载安装上海网站seo诊断
  • 网站建设部门宣言wordpress官网入口
  • 任何做网站域名注册信息
  • p2p网站 开发贵阳关键词优化平台
  • flash网站设计教程网站开发语言
  • 做农村网站多少钱网络营销与管理专业是干什么的
  • 有没有做奥数题的网站谷歌paypal官网入口
  • 学什么可以做响应式网站微信群推广平台有哪些
  • 临泉建设网站今天最新新闻事件报道
  • 灰色词快速排名接单百度的搜索引擎优化
  • 网站建设的特点seo搜索引擎优化软件
  • 微信支付网站未建设完善怎么seo关键词优化排名
  • 哪个网站不花钱可以做招聘友情链接qq群
  • 网站建设美词原创google引擎入口
  • 导航门户网站怎么做seo投放
  • wordpress如何修改评论东莞seo网络营销
  • 网站建设ui设计公司网络推广加盟
  • 网站后台不显示验证码seo网站优化培训价格
  • 中国做外贸最好的网站网络营销的发展趋势
  • 如何在凡科上做网站扬州网站推广公司
  • 施工企业价值链seo怎么才能优化好
  • 最专业的网站建设公司seo培训赚钱
  • 做网站属于印花税哪个范畴必应bing国内版
  • 三五互联网站建设垃圾app推广拉新
  • 网站开发文献翻译南宁seo服务公司
  • 药品在网站上做标签有哪些分类nba最新赛程
  • 济南网站建设和网络推广哪个好seo渠道