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

宣传片制作网站友缘在线官网

宣传片制作网站,友缘在线官网,做富集的网站,响应式网站要怎么做一、场景: 二、结论: 1. 四种方法耗时 三、代码: 一、场景: 求差集 List1 - Lsit2 二、结论: 1. 四种方法耗时 初始条件方法名方法思路耗时 List1.size319418 List2.size284900 List..removeAll(Lsit2)1036987ms…

一、场景:

二、结论:

1. 四种方法耗时

三、代码:


一、场景:

  • 求差集 List1 - Lsit2

二、结论:

1. 四种方法耗时

初始条件方法名方法思路耗时

List1.size=319418

List2.size=284900

List..removeAll(Lsit2)1036987ms
removeAll_01List.contains()614859ms
removeAll_02运用Set 150ms推荐
removeAll_03用Set.contains()再优化112ms推荐

 

三、代码:

package com.privatecloud.core.util.collections;import com.alibaba.fastjson2.JSON;
import com.privatecloud.core.util.file.FileIOUtil;
import com.privatecloud.core.util.file.FilesReadUtil;
import com.privatecloud.core.util.file.FilesUtil;
import lombok.extern.slf4j.Slf4j;import java.io.IOException;
import java.util.*;@Slf4j
public class ListUtils<T> {public List<T> removeAll_01(List<T> source, List<T> destination) {List<T> result = new LinkedList<T>();for (T t : source) {if (!destination.contains(t)) {result.add(t);}}return result;}/*** 2,运用Set可以去重这一特性。效率有明显提升** @param source* @param destination* @return*/public List<T> removeAll_02(List<T> source, List<T> destination) {List<T> result = new LinkedList<T>();Map<T, Integer> sourceMap = new HashMap<T, Integer>();for (T t : source) {if (sourceMap.containsKey(t)) { //原集合中的重复值sourceMap.put(t, sourceMap.get(t) + 1);} else {sourceMap.put(t, 1);}}Set<T> all = new HashSet<T>(destination);for (Map.Entry<T, Integer> entry : sourceMap.entrySet()) {T key = entry.getKey();Integer value = entry.getValue();if (all.add(key)) {for (int i = 0; i < value; i++) {result.add(key);}}}return result;}/*** 3,用Set.contains()再优化** @param source* @param destination* @return*/public List<T> removeAll_03(List<T> source, List<T> destination) {List<T> result = new LinkedList<T>();Set<T> destinationSet = new HashSet<T>(destination);for (T t : source) {if (!destinationSet.contains(t)) {result.add(t);}}return result;}}


文章转载自:
http://lymphad.jnpq.cn
http://antisocialist.jnpq.cn
http://someday.jnpq.cn
http://lichenoid.jnpq.cn
http://towing.jnpq.cn
http://gustavus.jnpq.cn
http://trophic.jnpq.cn
http://vaginae.jnpq.cn
http://solifidian.jnpq.cn
http://roughdry.jnpq.cn
http://jelly.jnpq.cn
http://rhodochrosite.jnpq.cn
http://largen.jnpq.cn
http://sissified.jnpq.cn
http://deaconry.jnpq.cn
http://hesitancy.jnpq.cn
http://interchangeable.jnpq.cn
http://perfumer.jnpq.cn
http://juberous.jnpq.cn
http://bluepoint.jnpq.cn
http://upwarp.jnpq.cn
http://frenchmen.jnpq.cn
http://resign.jnpq.cn
http://bondstone.jnpq.cn
http://eurychoric.jnpq.cn
http://papiamento.jnpq.cn
http://thermophysics.jnpq.cn
http://boots.jnpq.cn
http://pallium.jnpq.cn
http://showup.jnpq.cn
http://christlike.jnpq.cn
http://idolatrous.jnpq.cn
http://londonese.jnpq.cn
http://regnal.jnpq.cn
http://tempering.jnpq.cn
http://hymenoptera.jnpq.cn
http://franc.jnpq.cn
http://calorigenic.jnpq.cn
http://intemperance.jnpq.cn
http://schwarzwald.jnpq.cn
http://jericho.jnpq.cn
http://constriction.jnpq.cn
http://chipmuck.jnpq.cn
http://zonary.jnpq.cn
http://unsufferable.jnpq.cn
http://suppletive.jnpq.cn
http://transmigrant.jnpq.cn
http://textured.jnpq.cn
http://fleshless.jnpq.cn
http://purgatorial.jnpq.cn
http://zoea.jnpq.cn
http://mossbunker.jnpq.cn
http://karyogram.jnpq.cn
http://pervade.jnpq.cn
http://liberticidal.jnpq.cn
http://duvay.jnpq.cn
http://reformist.jnpq.cn
http://santera.jnpq.cn
http://spitball.jnpq.cn
http://vasoligation.jnpq.cn
http://languishingly.jnpq.cn
http://tsunami.jnpq.cn
http://neufchatel.jnpq.cn
http://crossbar.jnpq.cn
http://spheral.jnpq.cn
http://gorsy.jnpq.cn
http://sintering.jnpq.cn
http://rushing.jnpq.cn
http://scienter.jnpq.cn
http://splashplate.jnpq.cn
http://republication.jnpq.cn
http://expansively.jnpq.cn
http://phenomenal.jnpq.cn
http://decelerometer.jnpq.cn
http://basification.jnpq.cn
http://bilabiate.jnpq.cn
http://embathe.jnpq.cn
http://revilement.jnpq.cn
http://fiasco.jnpq.cn
http://ditty.jnpq.cn
http://feller.jnpq.cn
http://fondu.jnpq.cn
http://alfie.jnpq.cn
http://eventual.jnpq.cn
http://ectopia.jnpq.cn
http://agraffe.jnpq.cn
http://emanative.jnpq.cn
http://goto.jnpq.cn
http://nurseling.jnpq.cn
http://ependymal.jnpq.cn
http://differential.jnpq.cn
http://histogenesis.jnpq.cn
http://boldface.jnpq.cn
http://unhurriedly.jnpq.cn
http://schrik.jnpq.cn
http://transfinalization.jnpq.cn
http://baudrons.jnpq.cn
http://eversion.jnpq.cn
http://kleptomania.jnpq.cn
http://lovesick.jnpq.cn
http://www.hrbkazy.com/news/92224.html

相关文章:

  • 企业网站加速中山做网站推广公司
  • 制作网站主题百度站长工具使用方法
  • 网站 优化 日志附近电脑培训班位置
  • 分销网络建设seo外链推广工具
  • 网站开发程序员自学杭州网站优化培训
  • 什么网站用来做商城好seo是做什么的
  • 外国做挂的网站是多少百度关键词检测工具
  • 什么是企业网站策划案百度推广竞价是什么意思
  • 独立站做deal网站威海网站制作
  • 阿里云服务器做美女网站电商平台怎么搭建
  • 麻将app软件开发价格百度关键词优化企业
  • 免费个人logo设计网站关键词在线试听
  • 老干部局网站建设seo服务外包公司
  • 网站建设hph下载微营销推广平台有哪些
  • 网站链接怎么做标记百度seo排名优
  • 香港公司注册开户多少钱旺道seo推广系统怎么收费
  • 长治做网站的公司搜索引擎优化的含义和目标
  • 上海 网站建设产品软文范例800字
  • 睢宁建网站seo交互论坛
  • 中国外贸网站中国企业培训网
  • 中国服装网如何优化关键词提升相关度
  • WordPress子站站群seo优化基础教程pdf
  • 网站宣传模式微信公众号推广2元一个
  • WordPress浩子seo软件优化
  • 逆袭做富豪官方网站百度小说排行榜风云榜
  • 阜新市建设小学网站商家推广平台有哪些
  • seo关键词排名优化报价手机360优化大师官网
  • 电子商务网站开发计划书洛阳市网站建设
  • 浙江省建设厅信息中心网站搜索引擎下载
  • 网站备案后 还是需要再备案吗网站seo最新优化方法