/* 自定義代碼塊樣式 */

herrDeng網內搜尋

自訂搜尋

Ads

2023年12月6日 星期三

2023年12月4日 星期一

C, python解leetcode 2264 Largest 3 Same Digit Number in String


Leetcode又是連續出數日簡單的問題2264. Largest 3-Same-Digit Number in String,然而簡單問題還要要用適當的方式來解,解法最好有延展性,就用類似sliding window的解法。

2023年11月25日 星期六

C++ Python公式推導Prefix sum解Leetcode 1685 Sum of Absolute Differences in a...



C++ Python公式推導Prefix sum解Leetcode 1685  Sum of Absolute Differences in a Sorted Array
對於會用Σ處理公式的,Leetcode 1685. Sum of Absolute Differences in a Sorted Array這應算是Bill Gates口中簡單的數學,

2023年11月20日 星期一

C++ python 迴圈累加解Leetcode垃圾車問題2391 Minimum Amount of Time to Collect Gar...



C++ python 迴圈累加解Leetcode垃圾車問題2391  Minimum Amount of Time to Collect Garbage。Leetcode垃圾車的問題根本是閱讀測驗,

2023年11月19日 星期日

C++頻率分析解Leetcode 1887 Reduction Operations to Make the Array Elements Equal



C++頻率分析解Leetcode 1887 Reduction Operations to Make the Array Elements EqualLeetcode這個週末的兩題都能用frequency  count,即所謂的counting sort來解題,如1887. Reduction Operations to Make the Array Elements Equal。因為是線性時間比起官方解答都要快,當然就100趴

2023年11月16日 星期四

Python C++集合論Cantor對角線法解Leetcode 1980 Find Unique Binary String

Python  C++集合論Cantor對角線法解Leetcode 1980  Find Unique Binary String
別說純數學沒用,數論拿來做密碼設計,集合論的Cantor對角線法至少還能解程式,會用就一百趴。
Related Posts Plugin for WordPress, Blogger...

熱門文章