herrDeng網內搜尋

自訂搜尋

Ads

2025年6月19日 星期四

Py3 C++計數排序counting sort解Leetcode 2294 Partition Array Such That Maximu...

Py3 C++計數排序counting sort解Leetcode 2294  Partition Array Such That Maximum Difference Is K
基本上使用Greedy sort,而排序就用counting sort
[Python C++計數排序與一行解Leetcode 1051 Height Checker]https://www.youtube.com/watch?v=dybiq3pg-Os

2025年6月1日 星期日

C++Py3重複組合排容原理解Leetcode2929 Distribute Candies Among Children II

C++Py3重複組合排容原理解Leetcode2929  Distribute Candies Among Children II
Use combinatorial number with repetition & Inclusion-Exclusion Prinple to solve
[Py3解請進]

2025年5月25日 星期日

C++ Py3計數解Leetcode 2131 Longest Palindrome by Concatenating Two Letter ...


C++ Py3計數解Leetcode 2131  Longest Palindrome by Concatenating Two Letter Words
回文問題常被問到。這題基本上可以用計數的方法來解決。重點是兩個字母的字串 xy 和 yx 可以配對。
-----
Palindrome question is quite often asked. This question can be solved basically by using counting. It's important to know the 2-letter strings xy & yx can be paired.
[C, C++ ,python速解迴文Leetcode 2108 Find First Palindromic String in the Array]https://www.youtube.com/watch?v=eXhdv8jDpao
Related Posts Plugin for WordPress, Blogger...

熱門文章