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

herrDeng網內搜尋

自訂搜尋

Ads

2024年1月13日 星期六

python C++速解Leetcode 1347 Minimum Number of Steps to Make Two Strings A...


python cpp速解Leetcode 1347  Minimum Number of Steps to Make Two Strings Anagram
No need for hash table. there are are just 26 alphabets.
s is anagram of t  ⟺ freq(s)==freq(t)
In other words, s is a permutation of t.

2024年1月8日 星期一

Python C++解二元搜尋樹問題Leetcode 938 Range Sum of BST


Python C++解二元搜尋樹問題Leetcode 938  Range Sum of BST。其實這是蠻典型二元收尋樹的問題,可以試著使用preorder, postorder & inorder等不同走訪的方式來解,二元收尋樹是資料結構的內容,會用它來寫程式跟不會用,就有顯著的區隔。

2023年12月31日 星期日

Python C++速解Leetcode 1624 Largest Substring Between Two Equal Characters


Python C++速解Leetcode 1624 Largest Substring Between Two Equal Characters。2023年底是簡單題Leetcode 1624. Largest Substring Between Two Equal Characters,無需Hash table,用array才是王道

2023年12月30日 星期六

Python C++速解Leetcode 1897 Redistribute Characters to Make All Strings E...


Python CPP速解Leetcode 1897  Redistribute Characters to Make All Strings Equal。簡單問題要找到解方,想太複雜就不好了

2023年12月16日 星期六

Related Posts Plugin for WordPress, Blogger...

熱門文章