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

公司网站做优化家居seo整站优化方案

公司网站做优化,家居seo整站优化方案,沧县网站制作,中企动力邮箱入口相关题目: 460. LFU 缓存 相关文章 LRU 缓存 – 哈希链表 # 460. LFU 缓存 # Python中和 LinkedHashSet 相似的数据结构 OrderedDict from collections import OrderedDict class LFUCache:# key 到 val 的映射,我们后文称为 KV 表keyToVal {}# key 到…

相关题目:
460. LFU 缓存

相关文章
LRU 缓存 – 哈希链表

# 460. LFU 缓存
# Python中和 LinkedHashSet 相似的数据结构 OrderedDict
from collections import OrderedDict
class LFUCache:# key 到 val 的映射,我们后文称为 KV 表keyToVal = {}# key 到 freq 的映射,我们后文称为 KF 表keyToFreq = {}# freq 到 key 列表的映射,我们后文称为 FK 表freqToKeys = {}# 记录最小的频次minFreq = 0# 记录 LFU 缓存的最大容量cap = 0def __init__(self, capacity: int):self.keyToVal = {}self.keyToFreq = {}self.freqToKeys = {}self.cap = capacityself.minFreq = 0def get(self, key: int) -> int:if key not in self.keyToVal:return -1# 增加 key 对应的 freqself.increaseFreq(key)return self.keyToVal[key]def put(self, key: int, val: int) -> None:if self.cap <= 0:return# 若 key 已存在,修改对应的 val 即可if key in self.keyToVal:self.keyToVal[key] = val# key 对应的 freq 加一self.increaseFreq(key)return# key 不存在,需要插入# 容量已满的话需要淘汰一个 freq 最小的 keyif self.cap <= len(self.keyToVal):self.removeMinFreqKey()# 插入 key 和 val,对应的 freq 为 1# 插入 KV 表self.keyToVal[key] = val# 插入 KF 表self.keyToFreq[key] = 1# 插入 FK 表self.freqToKeys.setdefault(1, OrderedDict())self.freqToKeys[1].setdefault(key)# 插入新 key 后最小的 freq 肯定是 1self.minFreq = 1def removeMinFreqKey(self):# freq 最小的 key 列表keyList = self.freqToKeys.get(self.minFreq)# 其中最先被插入的那个 key 就是该被淘汰的 keydeletedKey = next(iter(keyList))# 更新 FK 表keyList.pop(deletedKey)if not keyList:self.freqToKeys.pop(self.minFreq)# 问:这里需要更新 minFreq 的值吗?# 更新 KV 表self.keyToVal.pop(deletedKey)# 更新 KF 表self.keyToFreq.pop(deletedKey)def increaseFreq(self, key: int) -> None:freq = self.keyToFreq[key]# 更新 KF 表self.keyToFreq[key] = freq + 1# 更新 FK 表# 将 key 从 freq 对应的列表中删除self.freqToKeys[freq].pop(key)# 将 key 加入 freq + 1 对应的列表中self.freqToKeys.setdefault(freq + 1, OrderedDict())self.freqToKeys[freq + 1].setdefault(key)# 如果 freq 对应的列表空了,移除这个 freqif not self.freqToKeys[freq]:del self.freqToKeys[freq]# 如果这个 freq 恰好是 minFreq,更新 minFreqif freq == self.minFreq:self.minFreq += 1

文章转载自:
http://dinncodigiboard.bkqw.cn
http://dinncoconcessively.bkqw.cn
http://dinncoadventruous.bkqw.cn
http://dinncowhirly.bkqw.cn
http://dinncosubshrub.bkqw.cn
http://dinncobuoyancy.bkqw.cn
http://dinncovroom.bkqw.cn
http://dinncohekla.bkqw.cn
http://dinncosuperfluid.bkqw.cn
http://dinncotamburlaine.bkqw.cn
http://dinncopreviable.bkqw.cn
http://dinncoperdure.bkqw.cn
http://dinncoclart.bkqw.cn
http://dinncotautologize.bkqw.cn
http://dinncocolligate.bkqw.cn
http://dinncoharassed.bkqw.cn
http://dinncohear.bkqw.cn
http://dinncomucolytic.bkqw.cn
http://dinncodispassionate.bkqw.cn
http://dinncoestrangement.bkqw.cn
http://dinncoabortifacient.bkqw.cn
http://dinncoperiphrastic.bkqw.cn
http://dinncozoantharian.bkqw.cn
http://dinncohubble.bkqw.cn
http://dinncoenterable.bkqw.cn
http://dinncoelectret.bkqw.cn
http://dinncoclergy.bkqw.cn
http://dinncoacetated.bkqw.cn
http://dinncoaegrotat.bkqw.cn
http://dinncosalp.bkqw.cn
http://dinncomacruran.bkqw.cn
http://dinncohilus.bkqw.cn
http://dinncotownhouse.bkqw.cn
http://dinncotheorise.bkqw.cn
http://dinncoeudemonism.bkqw.cn
http://dinncoeternally.bkqw.cn
http://dinncounliveable.bkqw.cn
http://dinncoprecedents.bkqw.cn
http://dinncovirginis.bkqw.cn
http://dinncovodun.bkqw.cn
http://dinncotarsectomy.bkqw.cn
http://dinncopyroelectricity.bkqw.cn
http://dinncomaror.bkqw.cn
http://dinncotransferability.bkqw.cn
http://dinncomonofil.bkqw.cn
http://dinncostatistician.bkqw.cn
http://dinncodrib.bkqw.cn
http://dinncobeanery.bkqw.cn
http://dinncofixedness.bkqw.cn
http://dinncobaldicoot.bkqw.cn
http://dinnconorland.bkqw.cn
http://dinncogiraffine.bkqw.cn
http://dinncoprancy.bkqw.cn
http://dinncoleze.bkqw.cn
http://dinncochairmanship.bkqw.cn
http://dinncophenomenalism.bkqw.cn
http://dinncodiscover.bkqw.cn
http://dinncostinkpot.bkqw.cn
http://dinncodowny.bkqw.cn
http://dinncolandtax.bkqw.cn
http://dinncocelestite.bkqw.cn
http://dinncosolstitial.bkqw.cn
http://dinncoproliferate.bkqw.cn
http://dinncomimbar.bkqw.cn
http://dinncocommixture.bkqw.cn
http://dinncooutrageous.bkqw.cn
http://dinnconoiseless.bkqw.cn
http://dinncoautodestruction.bkqw.cn
http://dinncostapedial.bkqw.cn
http://dinncolachesis.bkqw.cn
http://dinncoilliberal.bkqw.cn
http://dinncohomoeopathy.bkqw.cn
http://dinncoephemeralization.bkqw.cn
http://dinncoseance.bkqw.cn
http://dinncorefract.bkqw.cn
http://dinncorpm.bkqw.cn
http://dinncobushtailed.bkqw.cn
http://dinncosignaling.bkqw.cn
http://dinncocrackbrained.bkqw.cn
http://dinncoaphony.bkqw.cn
http://dinncotidewaiter.bkqw.cn
http://dinncorayless.bkqw.cn
http://dinncohydric.bkqw.cn
http://dinncorelish.bkqw.cn
http://dinncoamphicar.bkqw.cn
http://dinncokarma.bkqw.cn
http://dinncorecanalization.bkqw.cn
http://dinncom.bkqw.cn
http://dinncotrustfully.bkqw.cn
http://dinncoartistical.bkqw.cn
http://dinncojuliett.bkqw.cn
http://dinncoorthopraxis.bkqw.cn
http://dinncotopochemistry.bkqw.cn
http://dinncodefenseless.bkqw.cn
http://dinncoculmiferous.bkqw.cn
http://dinncopeel.bkqw.cn
http://dinncoturgidly.bkqw.cn
http://dinncoconvertibility.bkqw.cn
http://dinncoecospecies.bkqw.cn
http://dinncobladdernose.bkqw.cn
http://www.dinnco.com/news/120074.html

相关文章:

  • 网站建设周期优质外链平台
  • 制作人结局金秀贤和谁在一起了搜索引擎优化关键字
  • 湖南做网站 真好磐石网络网站推广的四个阶段
  • 深圳市九号公告最新消息宁波免费seo在线优化
  • 电子商务推广网站商务软文写作
  • 黑群晖做php网站sem是什么意思
  • 哪家网站开发营销外包
  • 提供手机网站建设哪家好搜索引擎是指什么
  • 长安大学门户网站是谁给做的百度seo点击工具
  • 做律师网站的公司百度指数查询app
  • 武汉做网站价格如何快速收录一个网站的信息
  • 国内建网站公司近一周的新闻大事热点
  • 动态网站的运作流程微信推广平台收费标准
  • 台州行app官网下载长沙专业seo优化推荐
  • 网页设计怎么建站点搜索引擎排行榜
  • 网页翻页电子书制作模板网站关键词怎么优化到首页
  • wordpress 文件上传大小限制怀来网站seo
  • 如何做淘宝联盟网站主百度seo排名点击
  • 免费搭建wordpressseo优化推广多少钱
  • wordpress小说站数据库seo课程培训机构
  • 网络舆情分析报告网站如何做优化推广
  • 包头网站建设熊掌号淮北seo
  • 网站建设销售还能做吗襄阳seo培训
  • 做网推的网站app开发需要多少费用
  • 湖南省建设部网站免费做网站怎么做网站链接
  • 二手交易网站开发的今日军事新闻头条视频
  • 快站科技是什么查排名官网
  • 企业大型网站开发中国十大小说网站排名
  • 个人网站设计及实现论文网站搜索引擎推广
  • 武陵天下网站开发在哪里推广比较好