Q1. Make Array Elements Equal to Zero | Easy | LeetCode Weekly Contest
🌐 中文版:繁體中文 Intro This is my first record of doing a LeetCode Weekly Contest. I jumped on today on a whim, so by the time I was ready to compete there wasn’t much time left. But I’m still a rookie, so I just focused on the first problem to test the waters, and stopped after finishing it. Problem statement Difficulty: Easy Statement: given an integer array nums, you first pick a starting point curr where nums[curr] = 0. From the starting point you can choose to move left or right, then rep...
Kubernetes for DevOps Notes |【DevOps Skill Tree】
🌐 中文版:繁體中文 BasicExplain what Kubernetes is A platform for container orchestration and management, used for automated deployment and scaling of containers. What are Kubernetes’s main features? Self-Healing: uses health checks to inspect running containers and takes corresponding action, e.g. restarting a container Load Balancing: distributes requests across different applications in the cluster Operations: applications packaged by Kubernetes can use the cluster’s API to update their state ...
AWS for DevOps Notes |【DevOps Skill Tree】
🌐 中文版:繁體中文 Regions & AZsRegion: a group of data centers spanning multiple geographic locations, e.g. us-east-1 Availability Zone (AZ): each region has multiple mutually-isolated locations called AZs. An AZ may contain one or more data centers with independent networking and power. us-east-1a, us-east-1b, etc. Local Zone: no physical data center of its own, usually connected to an AZ. For example, Taiwan’s Local Zone connects to ap-northeast-1, aiming to serve edge locations to reduce l...
Python for DevOps Notes |【DevOps Skill Tree】
🌐 中文版:繁體中文 Basic Data Typesdata type You can get an object or variable’s data type with type() 123>>> var = "This is a string">>> print(type(var))<class 'str'> Variables x valid x_y valid x-y invalid Python variables are case-sensitive VAR is not equal to var What happens when you type x=1? It creates an integer object with value 1 So a fixed-size address is allocated in memory to store 1 And the name x points to the reference for that object...
DevOps Skill Tree Knowledge Roundup |【Notes Index】
🌐 中文版:繁體中文 PrefaceThis records the common knowledge points for DevOps interviews, mainly notes organized from this GitHub repository: DevOps Exercises and ByteByteGo’s GitHub repo. It may take a long time to finish organizing everything. DevOps GeneralWhat is DevOps? DevOps is a culture and set of practices combining Development (Dev) and Operations (Ops), aiming to shorten the software delivery cycle and increase release frequency while keeping systems stable. Its core spirit is automat...
Problem-Solving Notes | Dynamic Programming (DP)
🌐 中文版:繁體中文 IntroEven before I started grinding LeetCode, I’d heard how terrifying DP problems are, so before actually starting on problems like these I wanted to organize my DP knowledge. While reading material online I found this article explains it really well, so I highly recommend reading this article first. The author mentions that to understand DP, patience matters, and you also need to be comfortable with recursion, because DP problems are usually solved with recursion. What is Dy...
Combination Sum | Medium | LeetCode#39. Combination Sum
🌐 中文版:繁體中文 Problem statement Difficulty: Medium Statement: given an integer array candidates and a target integer target, return all unique combinations of candidates where the numbers in each combination sum to target. You may return the combinations in any order. In this problem, each number in candidates can be chosen an unlimited number of times. Two combinations are unique if at least one number is chosen a different number of times.E.g. [2,2,3] != [2,2,2,2,3]The test cases guarant...
Other Ways to Do Manual Migration | PVE Series 3
🌐 中文版:繁體中文 PrefaceIn the first post of the PVE series, I demonstrated migration from the PVE console. Here I record another way to do migration. Manual migrationYou can first enter a node’s shell, then go to the /etc/pve/nodes directory, where you’ll find all the nodes in the same cluster. 1234root@pve:/etc/pve/nodes# ls -ltotal 0drwxr-xr-x 2 root www-data 0 Sep 10 11:06 pvedrwxr-xr-x 2 root www-data 0 Sep 10 14:21 pve2 Then enter the target node pve2, where you’ll find many directories. T...
Problem-Solving Notes | Backtracking & Recursion
🌐 中文版:繁體中文 RecursionWhen solving backtracking problems you can usually implement them with recursion, so it’s best to first understand the idea of recursion. The core idea of recursion is “break a big problem into several small problems, and the small problems can be split the same way into even smaller problems” and “except for the smallest problem, every level is solved the same way”. Tower of Hanoi The Tower of Hanoi is the classic recursion problem. The problem is: there are three rod...
PVE VM Live Migration Based on CPU Power Consumption | PVE Series 2
🌐 中文版:繁體中文 PrefaceIn the previous post we covered how to do live migration of VMs in Proxmox VE. Now we’ll add a condition to trigger migration. Since my need here is power consumption, I need to know how to get CPU power consumption info. Getting CPU power consumption infoThere are several ways to get CPU or other hardware power consumption. The simplest is powerstat to view CPU power in a Linux/Unix environment. Also, if the host has a BMC and supports IPMI, you can use ipmitool to ...








