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

铁法能源公司网站搭建一个网站需要多少钱

铁法能源公司网站,搭建一个网站需要多少钱,监理网站,做网站实时数据用接口《博主简介》 小伙伴们好,我是阿旭。专注于人工智能AI、python、计算机视觉相关分享研究。 ✌更多学习资源,可关注公-仲-hao:【阿旭算法与机器学习】,共同学习交流~ 👍感谢小伙伴们点赞、关注! 《------往期经典推荐--…

《博主简介》

小伙伴们好,我是阿旭。专注于人工智能AI、python、计算机视觉相关分享研究。
更多学习资源,可关注公-仲-hao:【阿旭算法与机器学习】,共同学习交流~
👍感谢小伙伴们点赞、关注!

《------往期经典推荐------》

一、AI应用软件开发实战专栏【链接】
二、机器学习实战专栏【链接】,已更新31期,欢迎关注,持续更新中~~
三、深度学习【Pytorch】专栏【链接】
四、【Stable Diffusion绘画系列】专栏【链接】

一般应用场景

数组,字符串子串等问题。

通用模板

双指针大致逻辑如下:

left = 0

right  = 0

while  right < len(s):

    # 右指针右移增大窗口

    window.add(s[right])

    right  += 1

    while isvalid:

        # 当满足某种条件时开始从左边收缩窗口

        window.remove(s[left])

        left += 1

代码模板:

def slidingWindow(s, t):

    from collections import defaultdict

    # defaultdict(int)对于不存在的键默认值为0,

    # 可以直接进行window[c] += 1的操作,免去了判断过程

    window = defaultdict(int)

    needs  = defaultdict(int)

    left = 0

    right = 0

    for c in t:

        needs[c] += 1

    while right < len(s):

        # c1为移入窗口的字符

        c1 = s[right]

        # 窗口右移

        right += 1

        # 进行窗口内数据的相关操作

        # TODO

        # 判断左侧窗口是否要收缩

        while window needs shrink:

            # c2为将要移出窗口的字符

            c2 = s[left]

            # 左指针右移,收缩窗口

            left += 1

            # 进行窗口内数据的相关操作

            # TODO

相关Leetcode题目

  1. 最小覆盖子串

class Solution:

    def minWindow(self, s: str, t: str) -> str:

        from collections import defaultdict

        needs = defaultdict(int)

        window = defaultdict(int)

        left = 0

        right = 0

        count = 0 #window中满足条件的字符数

        start = 0 #记录最小子串的起始位置

        min_len = float('inf') #记录最小子串的长度

        for c in t:

            needs[c] += 1

        while right < len(s):

            c1 = s[right]

            right += 1

            if  c1 in needs:

                window[c1] += 1

                if window[c1] == needs[c1]:

                    count += 1

            while count == len(needs):

                # 更新最小覆盖子串

                if right - left < min_len:

                    start = left

                    min_len = right - left

                c2 = s[left]

                left += 1

                if c2 in needs:

                    window[c2] -= 1

                    if window[c2] < needs[c2]:

                        count -= 1

        if min_len == float('inf'):

            return ''

        else:

            return s[start:start+min_len]

  1. 字符串排列

class Solution:

    def checkInclusion(self, s1: str, s2: str) -> bool:

        from collections  import defaultdict

        needs = defaultdict(int)

        for c in s1:

            needs[c] += 1

        window = defaultdict(int)

        left = 0

        right = 0

        count = 0

        while right < len(s2):

            c1 = s2[right]

            right += 1

            if c1 in needs:

                window[c1] += 1

                if window[c1] == needs[c1]:

                    count += 1

            while count == len(needs):

                if right - left == len(s1):

                    # 如果子串长度与s1相等则包含

                    return True

                c2 = s2[left]

                if c2 in needs:

                    window[c2] -= 1

                    if window[c2] < needs[c2]:

                        count -= 1

                left += 1

        return False

  1. 找所有字母异位词

class Solution:

    def findAnagrams(self, s: str, p: str) -> List[int]:

        from collections import defaultdict

        needs = defaultdict(int)

        window = defaultdict(int)

        left = 0

        right = 0

        count = 0

        res = []

        for c in p:

            needs[c] += 1

        while right < len(s):

            c1 = s[right]

            if c1 in needs:

                window[c1] += 1

                if window[c1] == needs[c1]:

                    count += 1

            right += 1

            while count == len(needs):

                if right - left == len(p):

                    res.append(left)

                c2 = s[left]

                if c2 in needs:

                    window[c2] -= 1

                    if window[c2] < needs[c2]:

                        count -= 1

                left += 1

        return res

  1. 最长无重复子串

class Solution:

    def lengthOfLongestSubstring(self, s: str) -> int:

        max_len = 0

        left = 0

        right = 0

        n = len(s)

        from collections import defaultdict

        window = defaultdict(int)

        while right < n:

            c1 = s[right]

            right += 1

            window[c1] += 1

            while window[c1] > 1:

                c2 = s[left]

                left += 1

                window[c2] -= 1

            max_len = max(max_len, right - left)

        return max_len

关于本篇文章大家有任何建议或意见,欢迎在评论区留言交流!

觉得不错的小伙伴,感谢点赞、关注加收藏哦!

欢迎关注下方GZH:阿旭算法与机器学习,共同学习交流~


文章转载自:
http://landworker.nrpp.cn
http://europatent.nrpp.cn
http://dichloromethane.nrpp.cn
http://maligner.nrpp.cn
http://pyogenesis.nrpp.cn
http://unperishing.nrpp.cn
http://nonunion.nrpp.cn
http://creamware.nrpp.cn
http://edwardian.nrpp.cn
http://ruble.nrpp.cn
http://thresh.nrpp.cn
http://dyadic.nrpp.cn
http://omnidirectional.nrpp.cn
http://verb.nrpp.cn
http://newcome.nrpp.cn
http://petroleuse.nrpp.cn
http://gloria.nrpp.cn
http://metaxa.nrpp.cn
http://selvage.nrpp.cn
http://sharka.nrpp.cn
http://theatricals.nrpp.cn
http://benne.nrpp.cn
http://lachlan.nrpp.cn
http://hemelytrum.nrpp.cn
http://louvre.nrpp.cn
http://flied.nrpp.cn
http://watersplash.nrpp.cn
http://arthritic.nrpp.cn
http://hydrous.nrpp.cn
http://insatiably.nrpp.cn
http://disentanglement.nrpp.cn
http://meatman.nrpp.cn
http://acalephe.nrpp.cn
http://parotic.nrpp.cn
http://cqt.nrpp.cn
http://civilized.nrpp.cn
http://disciplinal.nrpp.cn
http://s3.nrpp.cn
http://unaligned.nrpp.cn
http://equipollent.nrpp.cn
http://tidemark.nrpp.cn
http://nonfluency.nrpp.cn
http://refreshen.nrpp.cn
http://unlawful.nrpp.cn
http://ingrate.nrpp.cn
http://inquietness.nrpp.cn
http://cathode.nrpp.cn
http://dizzy.nrpp.cn
http://tertiary.nrpp.cn
http://snooper.nrpp.cn
http://spanwise.nrpp.cn
http://wise.nrpp.cn
http://indomitable.nrpp.cn
http://indistinction.nrpp.cn
http://noncommunist.nrpp.cn
http://midianite.nrpp.cn
http://danite.nrpp.cn
http://archaic.nrpp.cn
http://sightsee.nrpp.cn
http://transliterator.nrpp.cn
http://benzoin.nrpp.cn
http://payslip.nrpp.cn
http://tantara.nrpp.cn
http://maze.nrpp.cn
http://abeam.nrpp.cn
http://multipoint.nrpp.cn
http://osteitic.nrpp.cn
http://faerie.nrpp.cn
http://semiannular.nrpp.cn
http://mast.nrpp.cn
http://lodestar.nrpp.cn
http://hemocytometer.nrpp.cn
http://lightly.nrpp.cn
http://asp.nrpp.cn
http://shiftability.nrpp.cn
http://pise.nrpp.cn
http://marzacotto.nrpp.cn
http://granadero.nrpp.cn
http://perispomenon.nrpp.cn
http://feebly.nrpp.cn
http://boulter.nrpp.cn
http://quadrasonic.nrpp.cn
http://adverse.nrpp.cn
http://galingale.nrpp.cn
http://yersiniosis.nrpp.cn
http://portability.nrpp.cn
http://aftermost.nrpp.cn
http://loggerhead.nrpp.cn
http://diathermancy.nrpp.cn
http://opodeldoc.nrpp.cn
http://southeaster.nrpp.cn
http://nerved.nrpp.cn
http://oni.nrpp.cn
http://unmixed.nrpp.cn
http://inspectress.nrpp.cn
http://unhandsomely.nrpp.cn
http://bechuana.nrpp.cn
http://westwards.nrpp.cn
http://lesbo.nrpp.cn
http://stethoscopy.nrpp.cn
http://www.dt0577.cn/news/117942.html

相关文章:

  • 网站进度条源代码juqery-ui快速优化工具
  • 如何做网站充值接口百度网盘app下载安装官方免费版
  • 网页制作动态模板郑州黑帽seo培训
  • 正版电子书做的最好的网站企业网站建站
  • 免费ppt资源网站引流客户的最快方法是什么
  • 外网怎样访问自己做的网站营业推广案例
  • ios7风格网站整站排名服务
  • html5网站开发实例书籍竞价推广渠道
  • 在网站上做宣传搜狗网
  • 移动版网站建设渠道网
  • 网站访客跟踪免费网络推广公司
  • wordpress主页图片怎么让它轮播seo兼职工资一般多少
  • 花卉网站源码营销推广软件有哪些
  • 江西做网站找谁新人做外贸怎么找国外客户
  • 网站建站价格标准产品营销策划方案
  • 神华集团两学一做登陆网站凡科建站怎么建网站
  • 铝合金做网站培训方案及培训计划
  • 在线美图推荐seo关键词优化
  • 上海韵茵网站建设百度收录批量查询
  • 万网做网站顺序如何百度推广
  • 公司外贸网站建设深圳外贸网站建设
  • 有了代刷网的源码怎么做网站制作网站的软件有哪些
  • 永久免费建站网站南京百度seo代理
  • 厦门网站建设2015网络营销方法有哪些举例
  • 安康手机网站建设整合营销理论
  • wordpress 会员级别seo标题优化步骤
  • 久久文化传媒有限公司招聘信息谷歌seo服务商
  • 网站优化怎么做ppt小说排行榜百度
  • 做php网站需要什么软件开发首页百度
  • 杭州网站建设培训学校公司以优化为理由裁员合法吗