lru-cache leetcode problems https
LeetCode 872
Leaf-Similar Trees Leaf-Similar Trees - LeetCode Thinkings 二叉树无论先中后序遍历,所得叶子节点次序不变. Codes 我采用了非递归的中序遍历方式: /** * Definition for a binary tree node. * st ......
leetcode 5.最长回文子串
leetcode 5.最长回文子串 第五题:最长回文子串 1.中心拓展: 我们枚举所有的「回文中心」并尝试「扩展」,直到无法扩展为止,此时的回文串长度即为此「回文中心」下的最长回文串长度。我们对所有的长度求出最大值,即可得到最终的答案。拓展分为两种情况,奇数长度和偶数长度,分别拓展一次取较大值,同时 ......
[转帖]配置 Windows XP 正常上网(TLS HTTPS),连接到 NAS
https://zhuanlan.zhihu.com/p/208685816# 学习一下. 知乎用户8kqKq9 等 45 人赞同了该文章 Windows XP 是经典的、高效的、可靠的、性能良好的操作系统,然而其大部分版本都已在 2014 年停止支持。其较为流行的版本 SP2 与 SP3 由于各种 ......
[刷题班] LeetCode283. 移动零
题目描述 方法一:时间复杂度O(n2) class Solution { public void moveZeroes(int[] nums) { for (int i = 0; i < nums.length; i ++) { // 指针i为0的时候停止 if (nums[i] == 0) { / ......
[刷题班] LeetCode1002. 查找共用字符
题目描述 思路 关键字:“小写字母”、“出现频率”这些关键字都是为哈希法量身定做的。 求每个字符在所有字符串中最小出现的次数。最小次数为几就在结果集中添加几次该字符。 方法一: class Solution { public List<String> commonChars(String[] wor ......
[刷题班] LeetCode448. 找到所有数组中消失的数字
题目描述 思路 原地哈希: 找到数字i时,将位置i-1处的数字翻转为负数 如果位置i-1上的数组已经为负数,则不进行任何操作 再次遍历数组,将数值大于0的元素的下标+1加入到结果集中 方法一: class Solution { public List<Integer> findDisappeared ......
[刷题班] LeetCode442. 数组中重复的数据
题目描述 思路 原地哈希: 利用值域与数组下标空间大小的等同关系,我们可以构造一种对应"关系" 找到数字i时,将位置i-1处的数字翻转为负数 如果位置i-1上的数组已经为负数,则i是出现两次的数字,并将其加入到结果集中 方法一: class Solution { public List<Intege ......
面试题:Tcp,http,https分别的意义和他们的区别
TCP是一种可靠的,面向连接的传输协议,用于在网络上可靠的传输数据。它确保数据在发送和接收之间的可靠传递,TCP提供了可靠的字节流,确保数据按正常的顺序到达目标。 主要特点: 1.面向连接:在数据传输之前,发送方和传输方需要建立一个连接。 2.可靠性:TCP使用确认和重传机制来确保数据的可靠性。接收 ......
[LeetCode] 1979. Find Greatest Common Divisor of Array
Given an integer array nums, return the greatest common divisor of the smallest number and largest number in nums. The greatest common divisor of two ......
[LeetCode] 2807. Insert Greatest Common Divisors in Linked List
Given the head of a linked list head, in which each node contains an integer value. Between every pair of adjacent nodes, insert a new node with a val ......
leetcode 4. 寻找两个正序数组的中位数
leetcode 4. 寻找两个正序数组的中位数 第四题:寻找两个正序数组的中位数 1.合并数组,排序,找中位数 暴力解法,时间复杂度(M+N),空间复杂度(M+N) public double findMedianSortedArrays(int[] nums1, int[] nums2) { ......
CF1917D Yet Another Inversions Problem 题解
官方题解。 思路 首先可以把 \(a\) 数组分成 \(n\) 块,每块都是长为 \(k\) 的 \(q\) 数组。于是我们可以把答案拆成两部分计算:块内的贡献和块外的贡献。对于块内,\(p_i\) 都是一样的,因此可以直接消去,计算的实际上就是 \(q\) 序列的逆序对数,把这个值 \(\time ......
Vue ui 创建项目报错: ERROR Failed to get response from https://registry.npmjs.org/vue-cli-version-marker
虽然不影响项目的创建,但看着不舒服 按【Ctrl + C】退出 vue ui 输入命令强制清除npm缓存:npm cache clean --force ......
1-STM32F103+EC800K(移远4G Cat1)远程升级篇(自建物联网平台)-STM32通过EC800K使用http或https下载程序文件,升级程序(单片机程序检查更新)
<p><iframe name="ifd" src="https://mnifdv.cn/resource/cnblogs/ZLIOTB/EC800K/myota.html" frameborder="0" scrolling="auto" width="100%" height="1500"></ ......
The Biggest Water Problem
地址 #include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin>>n; ll sum=0; while(n>10){ ll sum=n; ll d=0; while(sum){ ......
Load text: https://tensorflow.google.cn/tutorials/load_data/text
Tensorflow Load text: This tutorial demonstrates two ways to load and preprocess text. First, you will use Keras utilities and preprocessing layers. T ......
抓包工具 Charles 抓取 HTTPS 系统
1.帮助--》ssl代理--》安装charles root证书 2.安装证书 3.代理 ssl代理设置 把要测试的系统加进去,https端口默认443 ......
在线客服插件 https网站添加代理
Nginx服务器: location /wss { proxy_pass http://localhost:8282; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connectio ......
分治法LeetCode经典例题(c语言解法)
多数元素https://leetcode.cn/problems/majority-element/description/ `//计数 int count(int* nums,int target,int left,int right){ int cnt = 0; for(int i = left ......
SciTech-Search-Bing.com 搜索API:{Web/ Custom / News / Autosuggest / Cognitive / Entity+Visual+Video+LocalBusiness / SpellCheck }: https://www.microsoft.com/en-us/bing/apis/bing-web-search-api
Azure: https://docs.microsoft.com/python/api/overview/azure/cognitive-services https://github.com/Azure/azure-sdk-for-python https://azure.microsoft.c ......
第6天:基础入门-抓包技术&HTTPS协议&APP&小程序&PC应用&WEB&转发联动
安装charles 到Windows本地: 安卓模拟器安装: 如果抓模拟器就要使用从远程主机,如果不是,则从所有进程 访问 谷歌浏览器安装证书: 41:43 :如何将charlet数据,带外代理到burpsuite ......
curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)
curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?) 最近遇到了一个这个问题 发现是因为自己加了一个这个 curl_easy_setopt(pCURL, CURLOPT_SSL_OPTIONS, ......
HTTPS加密套件的笔记
本文于2016年5月份完成,发布在个人博客网站上。 考虑个人博客因某种原因无法修复,于是在博客园安家,之前发布的文章逐步搬迁过来。 按照如下配置(适用于Tomcat 7.0.x),为Tomcat启用了HTTPS协议,用户访问站点时是否就安全了呢? <!-- HTTP通道,跳转至8443端口 --> ......
FreeBSD “su: Sorry” Problem
Solving the FreeBSD “su: Sorry” Problem The solution is to restart FreeBSD in single user mode and then make the change as root. This can be done by f ......
始智AI —— https://wisemodel.cn/ —— 试用
![image](https://img2024.cnblogs.com/blog/1088037/202401/1088037-20240103154541863-1664163216.png) ......
Leetcode 2982. 找出出现至少三次的最长特殊子字符串 II
开26个multiset,对于aabaaa,遍历,对第0个multiset push 1 2,然后对第一个multiset push 1,然后又对第0个multiset push 1 2,这时第0个multiset size超过3了,删除最小的元素,然后继续push 3,最后取 \(max_{i=1 ......
自签名证书与Nginx配置Https证书
0.背景 公私钥、证书体系、Https等基础知识。 这个之前有写过ppt,空了我编辑成文章传上来,再更新这里。 1.密钥及证书角色 1.1 CA 以RSA为例 该环节,模拟自己作为CA,生成ca的私钥和根证书。 1.1.1 私钥生成 openssl genrsa -out ca-private.ke ......
使用Cookie在VS Code中登录LeetCode插件
在VS Code的LeetCode插件中使用Cookie登录 1 在浏览器中打开leetcode网页并登录进去 2 按F12查看网页元素,找到graphql,查看其中的cookie,复制该cookie 3 在VS Code中点击登录leetcode的按钮,在登录方式中选择使用cookie登录,然后将 ......
洛谷 P9061 [Ynoi2002] Optimal Ordered Problem Solver
洛谷传送门 QOJ 传送门 考虑操作了若干次,所有点一定分布在一个自左上到右下的阶梯上或者在这个阶梯的右(上)侧。此处借用 H_W_Y 的一张图: 考虑如何计算答案。对于一次询问 \((X, Y)\),如果它在阶梯左下方不用管它,否则考虑容斥,答案即为 \(x \ge X, y \ge Y\) 的点 ......