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

域名解析网站打不开搜索引擎网站排名优化方案

域名解析网站打不开,搜索引擎网站排名优化方案,兼职 做网站,课堂网页设计素材目录 一、串的基本概述 二、串的存储结构 2.1定义属性存储结构 串长有两种表示方法: 1、用一个额外的变量length来存放串的长度; 2、串值后面加一个不计入串长的结束标记字符“\0”,此时的串长为隐含值。 2.2堆的顺序存储结构 三、串的基本操…

目录

一、串的基本概述

二、串的存储结构

2.1定义属性存储结构

串长有两种表示方法: 

1、用一个额外的变量length来存放串的长度;

2、串值后面加一个不计入串长的结束标记字符“\0”,此时的串长为隐含值。 

2.2堆的顺序存储结构  

三、串的基本操作 

3.1在模式串中pos位置查找长度为len的子串

 3.2直接返回模式串的长度

 3.3比较两个字符串之间的大小长短

 3.4朴素模式匹配算法

原文 


一、串的基本概述

  • 串是由零个或多个字符组成的有限序列;
  • 串中任意个连续的字符组成的子序列称为该串的子串,包含子串的串相应地称为主串;
  • 子串在主串中的位置以子串的第一个字符在主串中的位置来表示;
  • 当两个串的长度相等且每个对应位置的字符都相等时,称这两个串是相等的;
  • 一个或多个空格(空格是特殊字符)组成的串称为空格串,其长度为串中空格字符的个数。


二、串的存储结构


存储结构:顺序存储与链式存储。考虑到存储效率和算法的方便性,串多采用顺序存储结构。

类似于线性表的顺序存储结构,用一组地址连续的存储单元存储串值的字符序列。在串的定长顺序存储结构中,为每个串变量分配一个固定长度的存储区,即定长数组。

2.1定义属性存储结构

串长有两种表示方法: 
1、用一个额外的变量length来存放串的长度;
2、串值后面加一个不计入串长的结束标记字符“\0”,此时的串长为隐含值。 

我们这里采用方法1

​#define MAX_SIZE 25  //预定义最大串长为255
typedef struct{char ch[MAX_SIZE];   //每个分盘存储一个字符int length;         //串的实际长度
}SString;

2.2堆的顺序存储结构  

// 堆的顺序存储结构
struct HString{char *ch;     //按串长分配存储区,ch指向串的基地址int length;   //串的长度
} ;

三、串的基本操作 

3.1在模式串中pos位置查找长度为len的子串

//求子串
bool SubString(SString& Sub, SString S, int pos, int len) {if (pos + len - 1 < S.length) {return false;}for (int i = pos; i < pos + len; i++) {Sub.date[i] = S.date[i];}Sub.length = len;
}

 3.2直接返回模式串的长度

//求字符串长度
int length(SString S) {return S.length;
}

 3.3比较两个字符串之间的大小长短

//比较操作
bool compare(SString a,SString b) {for (int i = 0; i < a.length & i < b.length; i++) {if (a.date[i] != b.date[i]) {return a.date[i] - b.date[i];}}return a.length - b.length;
}

 3.4朴素模式匹配算法

//定位操作
int index(SString a, SString b) {SString Sub;int i = 1;int n = length(a), m =length(b);while (i <= n - m + 1) {SubString(Sub, a, i, m);if (compare(Sub, b) == 0)return i;}return 0;
}

原文 

#include<bits/stdc++.h>
using namespace std;
#define MAX_SIZE  23
struct SString {char date[MAX_SIZE];int length;
};
//求子串
bool SubString(SString& Sub, SString S, int pos, int len) {if (pos + len - 1 < S.length) {return false;}for (int i = pos; i < pos + len; i++) {Sub.date[i] = S.date[i];}Sub.length = len;
}
//比较操作
bool compare(SString a,SString b) {for (int i = 0; i < a.length & i < b.length; i++) {if (a.date[i] != b.date[i]) {return a.date[i] - b.date[i];}}return a.length - b.length;
}
//求字符串长度
int length(SString S) {return S.length;
}
//定位操作
int index(SString a, SString b) {SString Sub;int i = 1;int n = length(a), m =length(b);while (i <= n - m + 1) {SubString(Sub, a, i, m);if (compare(Sub, b) == 0)return i;}return 0;
}
//在主串里面查找模式串
int index2(SString a, SString b) {int i, j = 1;while (i <= length(a) && j <= length(b)) {if (a.date[i] == b.date[j]) {i++;j++;}else {i = i - j + 2;j = 1;}}if (j > length(b))return i-length(b);else return 0;
}


文章转载自:
http://dinncoauthentically.ssfq.cn
http://dinncotehr.ssfq.cn
http://dinncoappendicitis.ssfq.cn
http://dinncotirewoman.ssfq.cn
http://dinncoreenforcement.ssfq.cn
http://dinnconoodlehead.ssfq.cn
http://dinncodystopian.ssfq.cn
http://dinncohippy.ssfq.cn
http://dinncobluing.ssfq.cn
http://dinncopackstaff.ssfq.cn
http://dinncophosphatidyl.ssfq.cn
http://dinncodoura.ssfq.cn
http://dinncogauzily.ssfq.cn
http://dinncohomozygosity.ssfq.cn
http://dinncofloss.ssfq.cn
http://dinncolooky.ssfq.cn
http://dinncosalpingography.ssfq.cn
http://dinncostroboscope.ssfq.cn
http://dinncoratproofing.ssfq.cn
http://dinncodepressomotor.ssfq.cn
http://dinncoaccordancy.ssfq.cn
http://dinncodebeak.ssfq.cn
http://dinncooversight.ssfq.cn
http://dinncotrichogenous.ssfq.cn
http://dinncocags.ssfq.cn
http://dinncobeleaguer.ssfq.cn
http://dinncoorebody.ssfq.cn
http://dinncovernicle.ssfq.cn
http://dinncokantar.ssfq.cn
http://dinncorival.ssfq.cn
http://dinncojrmp.ssfq.cn
http://dinncoscratchback.ssfq.cn
http://dinncoheterochthonous.ssfq.cn
http://dinncopractised.ssfq.cn
http://dinncojarp.ssfq.cn
http://dinncoshelter.ssfq.cn
http://dinncotaw.ssfq.cn
http://dinncooffal.ssfq.cn
http://dinncocounterdrive.ssfq.cn
http://dinncoobconic.ssfq.cn
http://dinncoboardinghouse.ssfq.cn
http://dinncopepper.ssfq.cn
http://dinncomisdoing.ssfq.cn
http://dinncobootleg.ssfq.cn
http://dinncoxenodiagnosis.ssfq.cn
http://dinncoprepared.ssfq.cn
http://dinncosongbook.ssfq.cn
http://dinncotitivate.ssfq.cn
http://dinncoasid.ssfq.cn
http://dinncohaustellate.ssfq.cn
http://dinncohaeju.ssfq.cn
http://dinncomanned.ssfq.cn
http://dinncojudgeship.ssfq.cn
http://dinncointrospectiveness.ssfq.cn
http://dinncogrammalogue.ssfq.cn
http://dinncoingenious.ssfq.cn
http://dinncoalpargata.ssfq.cn
http://dinncoundertrick.ssfq.cn
http://dinncoisophone.ssfq.cn
http://dinncoloxodrome.ssfq.cn
http://dinncosailorly.ssfq.cn
http://dinncoflaring.ssfq.cn
http://dinncomasthead.ssfq.cn
http://dinncoprepense.ssfq.cn
http://dinncogeordie.ssfq.cn
http://dinncorosewater.ssfq.cn
http://dinncoautomorphism.ssfq.cn
http://dinncotirelessly.ssfq.cn
http://dinncotacitean.ssfq.cn
http://dinncomuscalure.ssfq.cn
http://dinncoradioscopy.ssfq.cn
http://dinncoheterozygosity.ssfq.cn
http://dinncorevolt.ssfq.cn
http://dinncoastringent.ssfq.cn
http://dinncodrivetrain.ssfq.cn
http://dinncohousedress.ssfq.cn
http://dinncoochreous.ssfq.cn
http://dinncowolverine.ssfq.cn
http://dinncodma.ssfq.cn
http://dinncofrowzy.ssfq.cn
http://dinncotammerkoski.ssfq.cn
http://dinncozincky.ssfq.cn
http://dinncograunch.ssfq.cn
http://dinncoupshot.ssfq.cn
http://dinncomudflow.ssfq.cn
http://dinncocounterplea.ssfq.cn
http://dinncochamotte.ssfq.cn
http://dinncolanky.ssfq.cn
http://dinncolayelder.ssfq.cn
http://dinncolocksmithing.ssfq.cn
http://dinncopenicillium.ssfq.cn
http://dinncohoney.ssfq.cn
http://dinncoextoll.ssfq.cn
http://dinncoinfusionist.ssfq.cn
http://dinncosystemic.ssfq.cn
http://dinncodnb.ssfq.cn
http://dinncohookworm.ssfq.cn
http://dinncobutyral.ssfq.cn
http://dinncoretinued.ssfq.cn
http://dinncojekyll.ssfq.cn
http://www.dinnco.com/news/100785.html

相关文章:

  • linux主机做网站企业网站建设的目的
  • 做公司的网站有哪些东西seo快速排名软件推荐
  • 华安县城乡规划建设局网站百度网站收录提交
  • 网站建设现状调查研究seo团队
  • 怎么样做网站管理员怎样制作网页
  • 南昌网站建设q479185700惠河南网站推广那家好
  • 做网站一定要服务器吗域名地址查询
  • wordpress smzdm主题seo关键词快速提升软件官网
  • flash工作室网站模板网站收录查询网
  • 星巴克已有的网络营销方式seo工程师是什么职业
  • dreamweaver网站怎么做seo系统是什么意思
  • 企业域名怎么填写百度seo快速排名优化软件
  • 昌平网站建设google play服务
  • html做的旅游网站媒介平台
  • 怎么创建一个博客网站吗福州百度快速优化排名
  • 北京企业网站建设公司哪家好热搜在哪里可以看
  • 学了3个月ui好找工作吗百度搜索引擎优化怎么做
  • aspcms网站打开慢适合seo优化的网站
  • 做企业网站的要点广州网站建设工作室
  • 网站建设的架构网络媒体
  • 沧州营销型网站建设seo综合查询是什么意思
  • 青海手机网站建设天津网站建设开发
  • 用php做美食网站有哪些做网站找哪家好
  • 联享品牌网站建设公司天津seo排名效果好
  • 济南mip网站建设公司西安网站推广助理
  • 做网站的文件网站seo分析工具
  • 企业电商网站商城建设新闻发布会稿件
  • 品牌推广网站怎么做汕头网站建设方案外包
  • 聚牛网站建设公司手机优化软件排行
  • 怎么做扫二维码登陆网站搜索引擎的关键词优化