接外包,有相关需求的可以联系我:Telegram | Email

Multiply Strings

Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. Note: You must not use any built-in BigInteger library or convert the inputs to integer directly.【The sadest things which I can found the fastest soultion in leetcode break this rule.】 https://leetcode.com/problems/multiply-strings/ Solut......

配置 Pod 以使用 PersistentVolume 作为存储

最近了解这个k8s在PVC存储这儿卡了两天,今天终于算是大概搞明白是个怎么回事了。 以下是该过程的总结: 创建由物理存储支持的 PersistentVolume。你不会将卷与任何 Pod 关联。 创建一个 PersistentVolumeClaim, 它将自动绑定到合适的 PersistentVolume。 创建一个使用 PersistentVolumeClaim 作为存储的 deployment https://kubernetes.io/zh/docs/tasks/configure-pod-container/con......

Interval List Intersections

You are given two lists of closed intervals, firstList and secondList, where firstList[i] = [starti, endi] and secondList[j] = [startj, endj]. Each list of intervals is pairwise disjoint and in sorted order. Return the intersection of these two interval lists. A closed interval [a, b] (with a <= b) denotes the set of real numbers x with a <= x <= b. The inter......

Merge Intervals

Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input. https://leetcode.com/problems/merge-intervals/ Solution submit code class Solution: def merge(self, intervals: List[List[int]]) -> List[List[int]]: if len(intervals) =......

Remove Covered Intervals

Given an array intervals where intervals[i] = [li, ri] represent the interval [li, ri), remove all intervals that are covered by another interval in the list. The interval [a, b) is covered by the interval [c, d) if and only if c <= a and b <= d. Return the number of remaining intervals. https://leetcode.com/problems/remove-covered-intervals/ Solution submit c......

Stone Game

Description Alice and Bob play a game with piles of stones. There are an even number of piles arranged in a row, and each pile has a positive integer number of stones piles[i]. The objective of the game is to end with the most stones. The total number of stones across all the piles is odd, so there are no ties. Alice and Bob take turns, with Alice starting first. Each turn, a player t......

Nim Game

You are playing the following Nim Game with your friend: Initially, there is a heap of stones on the table. You and your friend will alternate taking turns, and you go first. On each turn, the person whose turn it is will remove 1 to 3 stones from the heap. The one who removes the last stone is the winner. Given n, the number of stones in the heap, return true if you can win the game a......

如何使用树莓Pico的OLED屏幕和蓝牙?

最近买了树莓派Pico+OLED1602和一个蓝牙ESP32就想着能能搞点小东西,就尝试了一下硬件版的ScrollDigitalNote ,看看能不能搞出来,目前只是一个小的demo吧! 前提 硬件 树莓派pico 0.9寸OLED显示屏 ESP32 蓝牙WIFI模块 软件 Thonny:用于编程上传代码 Buletooth Controller:用于和蓝牙模块进行通信 接线 我这里主要说一下蓝牙模块吧,拆坑有点久,就是电......

Count Primes

Given an integer n, return the number of prime numbers that are strictly less than n. https://leetcode.com/problems/count-primes/ Solution Code python class Solution: def countPrimes(self, n: int) -> int: if n <= 1: return 0 tmp = [True] * n for i in range(2, n): if(tmp[i]): for j in range(i*i, n, ......

MySql 主从复制配置

最近又添加了几台服务器玩玩,现在有两个主机都在有数据库就想着能不能弄一个主从复制来作为数据的备份,这个数据有多重要就不需要我说了吧! 主节点配置 主机上的操作 主库在数据库配置文件添加如下,开启binlog log-bin server-id=1 重启数据库 导出主节点的所有表,并同步到子节点主机上 mysqldump -uroot -p密码 -A > /tmp/out.sql scp out.sql [email protected]子节点主机IP:/tmp/ 数据库里......


微信公众号

👉 NewsLetter ❤️ 邮箱订阅 👈

优惠码