網頁

2025年10月8日 星期三

C++ Py3 計數排序與partial sum解Leetcode 2300 Successful Pairs of Spells and ...







C++ Py3  計數排序與partial sum解Leetcode 2300  Successful Pairs of Spells and Potions
Portions的極大值小於等於10萬是可進行記數排序的關鍵,既然可以採用記數排序,後面的二元搜尋也可以透過partial sum的手法加速。
[Py3 code請進]