Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
(移至...)
首頁
密碼學
程式設計Programming
APP
計算機概論
▼
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等不同走訪的方式來解,二元收尋樹是資料結構的內容,會用它來寫程式跟不會用,就有顯著的區隔。
‹
›
首頁
查看網路版