Clay
LeetCode: 2336-Smallest Number in Infinite Set 解題紀錄
題目
You have a set which contains all positive integers [1, 2, 3, 4, 5, ...]
.
Implement the SmallestInfiniteSet
class:
LeetCode: 1768-Merge Strings Alternately 解題紀錄
題目
You are given two strings word1
and word2
. Merge the strings by adding letters in alternating order, starting with word1
. If a string is longer than the other, append the additional letters onto the end of the merged string.
LeetCode: 1431-Kids With the Greatest Number of Candies 解題紀錄
題目
There are n
kids with candies. You are given an integer array candies
, where each candies[i]
represents the number of candies the ith
kid has, and an integer extraCandies
, denoting the number of extra candies that you have.
LeetCode: 946-Validate Stack Sequences 解題紀錄
題目
Given two integer arrays pushed
and popped
each with distinct values, return true
if this could have been the result of a sequence of push and pop operations on an initially empty stack, or false
otherwise.
LeetCode: 2390-Removing Stars From a String 解題紀錄
題目
ou are given a string s
, which contains stars *
.
In one operation, you can:
Read More »LeetCode: 2390-Removing Stars From a String 解題紀錄[Linux] 彩色打印輸出 rich-cli 指令筆記
Introduction
rich-cli
是一個基於 Python rich
套件的命令列工具,也就是說,我們可以不必撰寫 Python 程式碼就直接輸出彩色終端機的文字結果。
LeetCode: 1857-Largest Color Value in a Directed Graph 解題紀錄
題目
There is a directed graph of n
colored nodes and m
edges. The nodes are numbered from 0
to n - 1
.
[Linux] 如何確認端口(port)已經被使用?
問題描述
我們通常都會在 Linux 伺服器上啟動各式各樣的服務,最常見的就是開一個網頁、開放一個端口(port)來讓我們或使用者測試開發中的功能。
Read More »[Linux] 如何確認端口(port)已經被使用?[已解決] VS Code 在連接到遠端伺服器中 Python 自動補完(autocomplete)失效
問題描述
一直以來,我在透過 VS Code 連接到公司遠端伺服器開發時,都會遇到 Python 在編輯器中無法幫忙自動補完(auto-complete)的問題。但說也奇怪,我在安裝 Jupyter Notebook 擴充套件後在 .ipynb 的檔案中自動補完就很正常,所以我也一直不以為意。
Read More »[已解決] VS Code 在連接到遠端伺服器中 Python 自動補完(autocomplete)失效