NGINX Configuration for Multiple Certificates

Configure NGINX for multiple certificate types on one domain and for SNI-based multi-domain certificate selection

2025-01-06 · 3 分钟

LeetCode - First Duplicate Value

给定一个整数数组,编写一个函数,返回从左到右读取数组时出现多次的第一个整数。数组元素取值范围是整数1到n, 数组长度为n. 比较特殊情况 \[2,3,4,2,3,5\] 返回2 \[2,3,4,4,2,5\] 返回4, 虽然2也是重复数字但是再2之后。 遍历查找, 两次嵌套循环,同时标注最小索引。 使用哈希表   如果…

2024-03-18 · 1 分钟

Product of Array Except Self

Given an array arr\[\] of n integers, construct a Product Array prod\[\] (of the same size) such that prod\[i\] is equal to the product of all the elements of…

2024-01-08 · 1 分钟

LeetCode-longest-peak

Given an array arr with N elements, the task is to find out the longest sub-array which has the shape of a mountain

2023-11-26 · 1 分钟

leetcode – spiral matrix

Given an m x n matrix, return _all elements of the_ matrix _in spiral order_.Input: Output: \[1,2,3,4,8,12,11,10,9,5,6,7\] 1. 首先确定行列的边界值, startRow,endRow…

2023-07-30 · 1 分钟

leetcode - Monotonic Array

An array is monotonic if it is either monotone increasing or monotone decreasing. An array nums is monotone increasing if for all i <= j, nums[i] <= nums[j].…

2023-01-23 · 1 分钟

Non-Constructible Change

给定一系列正整数,代表硬币的面值,找到无法从这些整数组连续组合成的最小值。比如 coins=\[1,2,5\], 最小不能组合成的值为4. 如果下一个整数大于前面所有值的累积和 + 1,那么就知道最小值,如果能被组合范围\[0, sum\], 下一个数据为y, 如果能构造出联系数据 sum+1 要在 \[y,sum+…

2022-05-04 · 1 分钟

Tournament winner

循环赛每个队对战所有其他对手, 胜利者记3分, 失败者记1分. 两个数组做为输入, competitions,存放主场队和客场队, results存放结果, 1表示主队获胜, 0表示客队获胜。返回分数最高的队伍。 使用一个hash表,key为队伍名称, 值为累计分数。时间复杂度O(n) 循环赛的数量, 空间复杂度O(…

2022-03-30 · 1 分钟

leetcode - Squares of a Sorted Array

Given an integer array nums sorted in non-decreasing order, return _an array of the squares of each number sorted in non-decreasing

2021-06-11 · 1 分钟

Leetcode-Is Subsequence

Given two strings s and t, check if s is a subsequence of t. A subsequence of a string is a new string that is formed from the original string by deleting some…

2021-05-18 · 1 分钟