今天我們要一起來聊聊 Docker,Docker 是現代開發與運維中不可或缺的工具,用來打包、部署和運行應用程式。它讓你能在任何環境中快速部署應用,實現「一次構建,隨處運行」的目標,是一個讓開發者與運維工程師都愛不釋手的工具。想像 Docker 就像是「貨櫃」,它能把你的應用程式打包起來,無論搬到哪台電腦上都能保證一致運行。準備好了嗎?讓我們開始吧!
單體架構 vs 微服務架構:選擇的關鍵與應用
深入淺出理解 Kubernetes/ Docker/ Container/ VM 概念
[筆記] Leetcode - 1913. Maximum Product Difference Between Two Pairs
https://leetcode.com/problems/maximum-product-difference-between-two-pairs/
The product difference between two pairs (a, b) and (c, d) is defined as (a * b) - (c * d).
For example, the product difference between (5, 6) and (2, 7) is (5 * 6) - (2 * 7) = 16.
Given an integer array nums, choose four distinct indices w, x, y, and z such that the product difference between pairs (nums[w], nums[x]) and (nums[y], nums[z]) is maximized.Return the maximum such product difference.
[筆記] Leetcode - 867. Transpose Matrix
https://leetcode.com/problems/transpose-matrix/
Given a 2D integer array matrix, return the transpose of matrix.
The transpose of a matrix is the matrix flipped over its main diagonal, switching the matrix’s row and column indices.
[筆記] Leetcode - 1903. Largest Odd Number in String
You are given a string num, representing a large integer. Return the largest-valued odd integer (as a string) that is a non-empty substring of num, or an empty string “” if no odd integer exists.
A substring is a contiguous sequence of characters within a string.
Example 1:
1 | Input: num = "52" |
Example 2:
1 | Input: num = "4206" |
Example 3:
1 | Input: num = "35427" |
1 | class Solution: |
[筆記] Leetcode - 1716. Calculate Money in Leetcode Bank
https://leetcode.com/problems/calculate-money-in-leetcode-bank
Hercy wants to save money for his first car. He puts money in the Leetcode bank every day.
He starts by putting in $1 on Monday, the first day. Every day from Tuesday to Sunday, he will put in $1 more than the day before. On every subsequent Monday, he will put in $1 more than the previous Monday.
Given n, return the total amount of money he will have in the Leetcode bank at the end of the nth day.
[筆記] Leetcode - 905. Sort Array By Parity
https://leetcode.com/problems/contains-duplicate/
Given an integer array nums, move all the even integers at the beginning of the array followed by all the odd integers.
Return any array that satisfies this condition.
[筆記] Leetcode - 217. Contains Duplicate
https://leetcode.com/problems/contains-duplicate/
Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.
[筆記] Leetcode - 136. Single Number
https://leetcode.com/problems/single-number/
Given a non-empty array of integers nums, every element appears twice except for one. Find that single one.
You must implement a solution with a linear runtime complexity and use only constant extra space.