網頁

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口中簡單的數學,然後Prefix sum的技巧,O(n)時間能一百趴的解就成形了

沒有留言:

張貼留言

HTML 編輯器