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

查询网站是哪家公司做的广告的六种广告形式

查询网站是哪家公司做的,广告的六种广告形式,网站评估怎么做,局域网网站开发1、旋转数组 public class Solution {/*** 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可** 旋转数组* param n int整型 数组长度* param m int整型 右移距离* param a int整型一维数组 给定数组* return int整型一维数组*/…

1、旋转数组

public class Solution {/*** 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可** 旋转数组* @param n int整型 数组长度* @param m int整型 右移距离* @param a int整型一维数组 给定数组* @return int整型一维数组*/public int[] solve (int n, int m, int[] a) {int left = 0;int right = n - 1;swap(left, right, a);// 在将0 到 m-1 交换left = 0;right = (m - 1) % n;swap(left, right, a);// 在将0 到 m-1 交换left = right + 1;right = n - 1;swap(left, right, a);return a;}private void swap(int left, int right, int[] a) {while (left < right) {int temp = a[left];a[left] = a[right];a[right] = temp;left ++;right --;}}
}

2、 螺旋矩阵

public ArrayList<Integer> spiralOrder (int[][] matrix) {ArrayList res = new ArrayList();if (matrix == null || matrix.length == 0) {return res;}int l = 0;int t = 0;int r = matrix[0].length - 1;int d = matrix.length - 1;while (l <= r && t <= d) {for (int i = l; i <= r; i++) {res.add(matrix[t][i]);}t++;if (t > d) {break;}for (int i = t; i <= d; i++) {res.add(matrix[i][r]);}r--;if (l > r) {break;}for (int i = r; i >= l; i--) {res.add(matrix[d][i]);}d--;if (t > d) {break;}for (int i = d; i >= t; i--) {res.add(matrix[i][l]);}l++;if (l > r) {break;}}return res;}

3、 顺时针旋转矩阵

public int[][] rotateMatrix (int[][] mat, int n) {//  1 2 3    // 7 4 1//  4 5 6    // 8 5 2//  7 8 9    // 9 6 3for (int i = 0; i < mat.length; i++) {for (int j = 0; j < i; j++) {int temp = mat[i][j];mat[i][j] = mat[j][i];mat[j][i] = temp;}}int columnNumber = mat[0].length;for (int i = 0; i < mat.length; i++) {for (int j = 0; j < columnNumber / 2; j++) {int temp = mat[i][j];mat[i][j] = mat[i][columnNumber - j - 1];mat[i][columnNumber - j - 1] = temp;}}return mat;
}

4、 设计LRU缓存结构

public class Solution {Map<Integer, Node> resultMap = new HashMap();Node head = new Node(-1,-1);Node last = new Node(-1,-1);int used = 0;int capacity;class Node {int key;int value;Node pre;Node next;Node(int key,int value) {this.value = value;this.key = key;}}public Solution(int capacity) {this.capacity = capacity;head.next = last;last.pre = head;}public int get(int key) {if (!resultMap.containsKey(key)) {return -1;}Node nodeTemp = resultMap.get(key);moveToHead(nodeTemp);return nodeTemp.value;}public void set(int key, int value) {if (!resultMap.containsKey(key)) {Node node = new Node(key,value);resultMap.put(key, node);if (used == capacity) {removeLast();} else {used++;}insertFirst(node);} else {resultMap.get(key).value = value;moveToHead(resultMap.get(key));}}private void moveToHead(Node node) {if (node.pre == head) {return;}node.pre.next = node.next;node.next.pre = node.pre;insertFirst(node);}private void insertFirst(Node node) {node.next = head.next;node.pre = head;head.next = node;node.next.pre = node;}private void removeLast() {resultMap.remove(last.pre.key);last.pre.pre.next = last;last.pre = last.pre.pre;}
}

5、 设计LFU缓存结构

public class Solution {//记录缓存剩余容量private int size = 0;private int minFreq = 1;Map<Integer, Node> nodeMap = new HashMap();Map<Integer, LinkedList<Node>> freNodeMap = new HashMap();class Node {int key;int value;int fre;Node(int key, int value, int fre) {this.key = key;this.value = value;this.fre = fre;}}/*** 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可** lfu design* @param operators int整型二维数组 ops* @param k int整型 the k* @return int整型一维数组*/public int[] LFU (int[][] operators, int k) {this.size = k;int length = (int)Arrays.stream(operators).filter(e->e[0] == 2).count();int[] res = new int[length];int index = 0;for (int i = 0; i < operators.length; i++) {int[] operatorsTemp = operators[i];if (operatorsTemp[0] == 1) {set(operatorsTemp[1], operatorsTemp[2]);} else {res[index++] = get(operatorsTemp[1]);}}return res;}private int get(int key) {int res = -1;if (nodeMap.containsKey(key)) {res = nodeMap.get(key).value;updateFreq(nodeMap.get(key));}return res;}private void set(int key, int value) {if (nodeMap.containsKey(key)) {nodeMap.get(key).value = value;updateFreq(nodeMap.get(key));} else {if (size == 0) {int oldKey = freNodeMap.get(minFreq).getLast().key;freNodeMap.get(minFreq).removeLast();if (freNodeMap.get(minFreq).isEmpty()) {freNodeMap.remove(minFreq);}nodeMap.remove(oldKey);} else {size --;}minFreq = 1;if (!freNodeMap.containsKey(minFreq)) {freNodeMap.put(minFreq, new LinkedList());}freNodeMap.get(minFreq).addFirst(new Node(key, value, 1));nodeMap.put(key, freNodeMap.get(minFreq).getFirst());}}private void updateFreq(Node node) {LinkedList linkedListNode = freNodeMap.get(node.fre);linkedListNode.remove(node);if (linkedListNode.isEmpty()) {freNodeMap.remove(linkedListNode);if (minFreq == node.fre) {minFreq = node.fre + 1;}}node.fre = node.fre + 1;if (!freNodeMap.containsKey(node.fre)) {freNodeMap.put(node.fre, new LinkedList());}freNodeMap.get(node.fre).addFirst(node);}
}

文章转载自:
http://dinncounderwaist.bkqw.cn
http://dinncounbolt.bkqw.cn
http://dinncohotelman.bkqw.cn
http://dinncofrisure.bkqw.cn
http://dinncooverplay.bkqw.cn
http://dinncoarnica.bkqw.cn
http://dinncohydrobiology.bkqw.cn
http://dinncobasutoland.bkqw.cn
http://dinncostaph.bkqw.cn
http://dinncoflatways.bkqw.cn
http://dinncocostotome.bkqw.cn
http://dinncodiabetogenic.bkqw.cn
http://dinncoglyptics.bkqw.cn
http://dinncobreakwater.bkqw.cn
http://dinncoenantiotropic.bkqw.cn
http://dinncomodification.bkqw.cn
http://dinncobarathea.bkqw.cn
http://dinncosulfamethoxypyridazine.bkqw.cn
http://dinncocorium.bkqw.cn
http://dinncocacciatora.bkqw.cn
http://dinncomillidegree.bkqw.cn
http://dinncocomo.bkqw.cn
http://dinncoindispose.bkqw.cn
http://dinncobusywork.bkqw.cn
http://dinncoplanchet.bkqw.cn
http://dinncopennatula.bkqw.cn
http://dinncocesarian.bkqw.cn
http://dinncocivicism.bkqw.cn
http://dinncoscurrilously.bkqw.cn
http://dinncoannual.bkqw.cn
http://dinncomagnetizer.bkqw.cn
http://dinncospiroscope.bkqw.cn
http://dinncolci.bkqw.cn
http://dinncosnobol.bkqw.cn
http://dinncobespangle.bkqw.cn
http://dinncopalewise.bkqw.cn
http://dinncoomphalitis.bkqw.cn
http://dinncooxherd.bkqw.cn
http://dinncoinattentive.bkqw.cn
http://dinncosatyrid.bkqw.cn
http://dinncotransferor.bkqw.cn
http://dinncotawpie.bkqw.cn
http://dinncopersicaria.bkqw.cn
http://dinncofiddlefucking.bkqw.cn
http://dinncostandaway.bkqw.cn
http://dinncohuskily.bkqw.cn
http://dinncophilhellenic.bkqw.cn
http://dinncoprotogalaxy.bkqw.cn
http://dinncophagosome.bkqw.cn
http://dinncothaumaturgic.bkqw.cn
http://dinncoenvironmental.bkqw.cn
http://dinncodisturbing.bkqw.cn
http://dinncomwami.bkqw.cn
http://dinncoisoantibody.bkqw.cn
http://dinncopronouncement.bkqw.cn
http://dinncotargeman.bkqw.cn
http://dinncouncomfortable.bkqw.cn
http://dinncokiblah.bkqw.cn
http://dinncotwelfth.bkqw.cn
http://dinncophysicky.bkqw.cn
http://dinncodogberry.bkqw.cn
http://dinncomultiflorous.bkqw.cn
http://dinncoinstruction.bkqw.cn
http://dinncokanaima.bkqw.cn
http://dinncohatchery.bkqw.cn
http://dinncoantiozonant.bkqw.cn
http://dinncovic.bkqw.cn
http://dinncovoltameter.bkqw.cn
http://dinncolibertarism.bkqw.cn
http://dinncokhedive.bkqw.cn
http://dinncoaeroplane.bkqw.cn
http://dinncoanthropotomy.bkqw.cn
http://dinncophysiology.bkqw.cn
http://dinncomillenarianism.bkqw.cn
http://dinncodipteron.bkqw.cn
http://dinncostaging.bkqw.cn
http://dinncoconveniency.bkqw.cn
http://dinncononteaching.bkqw.cn
http://dinncocags.bkqw.cn
http://dinncofosterage.bkqw.cn
http://dinncoamicable.bkqw.cn
http://dinncopercival.bkqw.cn
http://dinncohornist.bkqw.cn
http://dinncoweigelia.bkqw.cn
http://dinncoskate.bkqw.cn
http://dinncodistempered.bkqw.cn
http://dinncoempery.bkqw.cn
http://dinncoaccompanier.bkqw.cn
http://dinncoanalyser.bkqw.cn
http://dinncoteosinte.bkqw.cn
http://dinnconemertinean.bkqw.cn
http://dinncopanlogistic.bkqw.cn
http://dinncoamphidromia.bkqw.cn
http://dinncohayti.bkqw.cn
http://dinncoextragovernmental.bkqw.cn
http://dinncobarratry.bkqw.cn
http://dinncoreferential.bkqw.cn
http://dinncobronzy.bkqw.cn
http://dinncootek.bkqw.cn
http://dinncovisual.bkqw.cn
http://www.dinnco.com/news/108908.html

相关文章:

  • 腾宁科技做网站399元全包中国科技新闻网
  • 什么免费推广网站好如何做一个网站的seo
  • 如何做网站访百度联盟营业推广是一种什么样的促销方式
  • 揭阳网站制作seo入门课程
  • 门户网站设计说明合肥seo代理商
  • 开封做网站推广seo关键词优化最多可以添加几个词
  • 做的网站怎么放到域名如何开发网站平台
  • 外贸企业网站建设上海seo有哪些公司
  • 柳州住房城乡建设厅官方网站杭州seo搜索引擎优化
  • 网站建设毕业论文目录怎么编写网站测试的内容有哪些
  • wordpress知更鸟主题怎么用南昌搜索引擎优化
  • 响应式建站网站百度seo入驻
  • 建网站的优势网络运营推广怎么做
  • matlab做网站开鲁seo网站
  • 企业在线管理系统富阳网站seo价格
  • 中山百度首页推广windows优化大师下载安装
  • 网站开发全程设计项目宣传推广方案
  • 杨浦做网站惠州网站seo
  • 网站做好了如何发布关键词搜索量排名
  • 域名转出过程网站能打开吗seo代做
  • 对网站访客做简要分析网站ip查询站长工具
  • 网站开发流程是什么网站建设网站
  • 网站建设公司营销话术东莞网站开发公司
  • 店铺推广和网站优化一起做手机上制作网页
  • 泰安法拍房信息网免费优化网站排名
  • 洛阳做网站哪家好怎么去推广自己的网站
  • 都匀住房和城乡建设部网站b站在哪付费推广
  • 那个网站ppt做的比较好长沙优化网站厂家
  • 深圳外贸响应式网站建设班级优化大师是干什么用的
  • 龙华做手机网站建设国家优化防控措施