LeetCode 筆記 - 1658. Minimum Operations to Reduce X to Zero
題目在此 1658. Minimum Operations to Reduce X to Zero
給定一個數列與目標 x,你可以從數列挑選最左邊或最右邊的元素讓 x 減,直到使 x 等於 0
請計算出最小步驟!
題目在此 1658. Minimum Operations to Reduce X to Zero
給定一個數列與目標 x,你可以從數列挑選最左邊或最右邊的元素讓 x 減,直到使 x 等於 0
請計算出最小步驟!
題目在此 1332. Remove Palindromic Subsequences
給定一個僅包含 a, b 的字串,一次可以移除一個迴文字串,請計算出將字串清空的移除次數
Sometimes, we need to list all the files in a folder or sub folder in Python.
In this post, I will show you how to use the glob function to achieve this.
題目在此 160. Intersection of Two Linked Lists
給定一個 Linked list,它擁有兩個起點並最終會合併在一起
請找出出會合的節點
有時候你的程式會需要等待一段時間再回來看
如果有辦法可以在程式結束時,可以用某種方式通知你
就可以省下一些時間
這篇文章分享了,如何用程式化的方式在 Mac 發出系統通知
Sometimes, you need to execute some process for a while.
If there is a way to notify you when your process is finished.
It will save a lot of time.
Right here, I show you how to activate a Mac system notification programmatically.
題目在此 303. Range Sum Query - Immutable
給定一個數列,請根據給定的範圍計算出區段總和
題目在此 304. Range Sum Query 2D - Immutable
給定一個 2D matrix,請根據給定的矩形範圍計算出舉行總和
題目在此 867. Transpose Matrix
給定一個 2D matrix,請做出 Transpose Matrix
題目在此 1461. Check If a String Contains All Binary Codes of Size K
給定一個二進位字串 s 與數字 k,請判斷任何 k 長度的二進位字串是否有在 s 裡
題目在此 1480. Running Sum of 1d Array
給定一個數列,請做出 Prefix Sum