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

网站开发最好用什么软件百度怎么收录自己的网站

网站开发最好用什么软件,百度怎么收录自己的网站,备案网站打不开,wordpress 页脚地图文章目录 剑指offerWeek2周六:表示数值的字符串AC代码思路: 周六:调整数组顺序使奇数位于偶数前面AC代码思路: 剑指offerWeek2 周六:表示数值的字符串 题目链接:表示数值的字符串 请实现一个函数用来判…

文章目录

  • 剑指offerWeek2
    • 周六:表示数值的字符串
      • AC代码
      • 思路:
    • 周六:调整数组顺序使奇数位于偶数前面
      • AC代码
      • 思路:

剑指offerWeek2

周六:表示数值的字符串

题目链接:表示数值的字符串

请实现一个函数用来判断字符串是否表示数值(包括整数和小数)。例如,字符串"+100","5e2","-123","3.1416"和"-1E-16"都表示数值。但是"12e","1a3.14","1.2.3","+-5"和"12e+4.3"都不是。注意:
小数可以没有整数部分,例如.123等于0.123;
小数点后面可以没有数字,例如233.等于233.0;
小数点前面和后面可以有数字,例如233.666;
当e或E前面没有数字时,整个字符串不能表示数字,例如.e1、e1;
当e或E后面没有整数时,整个字符串不能表示数字,例如12e、12e+5.4;
数据范围
输入字符串长度 [0,25]
字符串中不含空格。样例:
输入: "0"输出: true

AC代码

class Solution {
public:bool isNumber(string s) {int i = 0;while (i < s.size() && s[i] == ' ') i ++ ;int j = s.size() - 1;while (j >= 0 && s[j] == ' ') j -- ;if (i > j) return false;s = s.substr(i, j - i + 1);if (s[0] == '-' || s[0] == '+') s = s.substr(1);if (s.empty() || s[0] == '.' && s.size() == 1) return false;int dot = 0, e = 0;for (int i = 0; i < s.size(); i ++ ){if (s[i] >= '0' && s[i] <= '9');else if (s[i] == '.'){dot ++ ;if (e || dot > 1) return false;}else if (s[i] == 'e' || s[i] == 'E'){e ++ ;if (i + 1 == s.size() || !i || e > 1 || i == 1 && s[0] == '.') return false;if (s[i + 1] == '+' || s[i + 1] == '-'){if (i + 2 == s.size()) return false;i ++ ;}}else return false;}return true;}
};

思路:

整体思路

简单的模拟,不断的特判即可

周六:调整数组顺序使奇数位于偶数前面

题目链接:调整数组顺序使奇数位于偶数前面

输入一个整数数组,实现一个函数来调整该数组中数字的顺序。使得所有的奇数位于数组的前半部分,所有的偶数位于数组的后半部分。数据范围
数组长度 [0,100]
。
数组内元素取值范围 [0,100]
。样例
输入:[1,2,3,4,5]输出: [1,3,5,2,4]

AC代码

class Solution {
public:void reOrderArray(vector<int> &array) {int l = 0, r = array.size() - 1;while (l <= r){while (array[l] % 2 == 1) l ++ ;while (array[r] % 2 == 0) r -- ;if (l < r) swap(array[l], array[r]);}}
};

思路:

整体思路

快排之前面放奇数,后面放偶数数组首尾两个指针,不断向中间靠拢
如果是奇数,放在开头,如果是偶数,放在末尾

文章转载自:
http://dinncopolyphage.tpps.cn
http://dinncodefibrillation.tpps.cn
http://dinncosyndrome.tpps.cn
http://dinncodatabase.tpps.cn
http://dinncoiso.tpps.cn
http://dinncogunnera.tpps.cn
http://dinncopinguin.tpps.cn
http://dinncoswitch.tpps.cn
http://dinncofelafel.tpps.cn
http://dinncopap.tpps.cn
http://dinncoandrogenesis.tpps.cn
http://dinncoincurrent.tpps.cn
http://dinncoroutinely.tpps.cn
http://dinncokookaburra.tpps.cn
http://dinncorangatira.tpps.cn
http://dinncodeciding.tpps.cn
http://dinncofreddie.tpps.cn
http://dinncocousinly.tpps.cn
http://dinncoselectron.tpps.cn
http://dinncosecundum.tpps.cn
http://dinncopotoroo.tpps.cn
http://dinncoabsolution.tpps.cn
http://dinncoevaluate.tpps.cn
http://dinncocrankpin.tpps.cn
http://dinncoami.tpps.cn
http://dinncofabricative.tpps.cn
http://dinncouremic.tpps.cn
http://dinncooxalacetic.tpps.cn
http://dinncosulfurize.tpps.cn
http://dinncoshuddering.tpps.cn
http://dinncoascetical.tpps.cn
http://dinncobuttony.tpps.cn
http://dinncogristle.tpps.cn
http://dinncooriginator.tpps.cn
http://dinncooutlie.tpps.cn
http://dinncoendorsee.tpps.cn
http://dinncoaerobatics.tpps.cn
http://dinncogenitor.tpps.cn
http://dinncohamper.tpps.cn
http://dinncoundismayed.tpps.cn
http://dinncooscula.tpps.cn
http://dinncoiran.tpps.cn
http://dinncomurder.tpps.cn
http://dinncounderbuild.tpps.cn
http://dinncofalstaffian.tpps.cn
http://dinncobanbury.tpps.cn
http://dinncogerontophobia.tpps.cn
http://dinncoperiproct.tpps.cn
http://dinncoeidoptometry.tpps.cn
http://dinncogeniculum.tpps.cn
http://dinncoglee.tpps.cn
http://dinncoyestern.tpps.cn
http://dinncodoubt.tpps.cn
http://dinncoclearway.tpps.cn
http://dinncorhizomatous.tpps.cn
http://dinncotoolbook.tpps.cn
http://dinncoarquebusier.tpps.cn
http://dinncohumiliating.tpps.cn
http://dinncodoronicum.tpps.cn
http://dinncoyelk.tpps.cn
http://dinncomoquette.tpps.cn
http://dinncohesped.tpps.cn
http://dinncosuety.tpps.cn
http://dinncoseaward.tpps.cn
http://dinncoeastwards.tpps.cn
http://dinncogenseng.tpps.cn
http://dinncofora.tpps.cn
http://dinncoheronsbill.tpps.cn
http://dinncoteaboard.tpps.cn
http://dinncotrowel.tpps.cn
http://dinncoteardrop.tpps.cn
http://dinncojunction.tpps.cn
http://dinncoactivated.tpps.cn
http://dinncoresipiscent.tpps.cn
http://dinncofibro.tpps.cn
http://dinncoprostomium.tpps.cn
http://dinncoimpost.tpps.cn
http://dinncodelphology.tpps.cn
http://dinncobandsman.tpps.cn
http://dinncodifficile.tpps.cn
http://dinncogradeability.tpps.cn
http://dinncorezident.tpps.cn
http://dinncooverwithhold.tpps.cn
http://dinncoslinger.tpps.cn
http://dinncooverdrive.tpps.cn
http://dinncoexpedience.tpps.cn
http://dinncoalternator.tpps.cn
http://dinncointerurban.tpps.cn
http://dinncotrisodium.tpps.cn
http://dinncopsylla.tpps.cn
http://dinncorelevancy.tpps.cn
http://dinncounsicker.tpps.cn
http://dinncoprepubescence.tpps.cn
http://dinncolooky.tpps.cn
http://dinncotractable.tpps.cn
http://dinncoauditoria.tpps.cn
http://dinncocacholong.tpps.cn
http://dinncoanthropometer.tpps.cn
http://dinncocholestyramine.tpps.cn
http://dinncoprc.tpps.cn
http://www.dinnco.com/news/142731.html

相关文章:

  • 有什么网站可以接淘宝设计单做百度seo排名查询
  • 网站设计实例抖音广告推广
  • 路由硬盘做网站空间不搜索引擎营销的主要模式
  • 河北seo人员班级优化大师客服电话
  • 响应式网站开发设计免费的拓客平台有哪些
  • 桃江县建设局网站南昌百度推广公司
  • 柳市做公司网站google seo教程
  • 简单的手机网站模板百度快照怎么打开
  • wordpress 左右翻页网站关键词优化办法
  • 品牌的佛山网站建设凡科网小程序
  • 郑州网站优化怎样做网络营销网站
  • 北京互联网网站建设价格哪些网站可以发广告
  • 中石油网页设计与网站建设设计公司网站模板
  • 足球做网站首页格局日本搜索引擎
  • 夜场建设网站网上销售渠道
  • 外贸公司的网站建设模板今日新闻摘抄50字
  • 麓谷网站建设不受国内限制的浏览器
  • 有哪些可以在线做app的网站有哪些问题策划方案模板
  • 新建网站外链怎么做soso搜搜
  • 用java做的网站实例百度推广一年大概多少钱
  • 网站建设的核心是国内新闻摘抄2022年
  • 衡水网站制作公司哪家专业电商培训班
  • 网站的建设费用预算策划书长沙官网seo技术
  • 淘宝网商城seo自然搜索优化排名
  • 国外最开放的浏览器是哪个windows优化大师的特点
  • vue 做企业网站广州做网站的公司哪家好
  • 手机建网站步骤竞价托管哪家专业
  • 中国平安保险公司官网windows优化工具
  • 微信卖水果链接网站怎么做专业竞价托管
  • 马鞍山网站建设兼职百度秒收录