/* 自定義代碼塊樣式 */
Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
首頁
密碼學
程式設計Programming
APP
計算機概論
herrDeng網內搜尋
自訂搜尋
Ads
2024年11月2日 星期六
Colab上安裝中文字型修改股市爬蟲pyplot顯圖
Colab上安裝中文字型修改股市爬蟲pyplot顯圖
使用python套件:
numpy, requests. pyplot, matplotlib.font_manager, matplotlib.mpl
黑柴犬康芮颱風後行走
Python C++使用字串find迴圈速解Leetcode 2490 Circular Sentence
Python C++使用字串find迴圈速解Leetcode 2490 Circular Sentence
C++ & Python都有字串的find,用法都類似
split=s.find(' ', split+1)能找到s從index=split+1開始出現' '的第一個的index
[Python解請進, C++ 一行解]
按我讀文 »
2024年10月22日 星期二
C++ Python DFS與nth element( nlargest)Leetcode 2583 Kth Largest Sum in a...
Python C++ DFS與nth element nlargest解Leetcode 2583 Kth Largest Sum in a Binary Tree
用容器一次就配置大一點,寧可大一點不要不夠,解答的Code才會夠快。 解答快速程式簡單。
[Python解答請進]
----------
按我讀文 »
2024年10月14日 星期一
Python C++ heap priority queue速解L eetcode 2530 Maximal Score After Appl...
Python CPP heap priority queue速解L eetcode 2530. Maximal Score After Applying K Operations
heap/priority queue是重要的資料結構,無論是C++的std::priority_queue或是python的heapq都可以拿來練習這題用貪婪演算可解的問題
----------
Python解請進
按我讀文 »
2024年10月4日 星期五
貪婪計數Python C++解Leetcode 2491 Divide Players Into Teams of Equal Skill
貪婪計數Python C++解Leetcode 2491 Divide Players Into Teams of Equal Skill
貪婪演算+counting sort加上2-pointer這樣就完成打敗100趴的快速C++解答[Python code請進]
-----
按我讀文 »
2024年9月19日 星期四
C++採Catalan數的遞迴DP方式計算Leetcode 241 Different Ways to Add Parentheses
C++採Catalan數的遞迴DP方式計算Leetcode 241 Different Ways to Add Parentheses
每個數字都是葉節點,而+、-、*操作則不是。算術公式的 dfs 走訪等價於其對應的帶括號的 inOrder 算式。
-----
按我讀文 »
2024年9月15日 星期日
Python C++ bitmask解Leetcode 1371 Find the Longest Substring Containing ...
Python C++ bitmask解Leetcode 1371 Find the Longest Substring Containing Vowels in Even Counts
建構一個容器first_seen[32](5個母音考慮2**5=32),它表示第一次看到的32不同bmask的索引
[Python code請進]
-----
按我讀文 »
2024年9月5日 星期四
python C++速解Leetcode算術題2028 Find Missing Observations
python C++速解Leetcode算術題2028 Find Missing Observations
[Python code請進]
按我讀文 »
2024年9月3日 星期二
python C++速解Leetcode 1945 Sum of Digits of String After Convert
python C++速解Leetcode 1945 Sum of Digits of String After Convert
這是個簡單問題,有技巧。
第一次轉換不需要用bigINT來存,只是將數字與第1輪的數字相加即可。
由於s.length最多可能為100,因此使用bigInt或其他字串效率非常低。
[Python code請進]
---
按我讀文 »
較新的文章
較舊的文章
首頁
訂閱:
文章 (Atom)
熱門文章
test
test請留言! 到第十前,都沒說對!提示一下: 形態轉換int->float int sum=596; average=(double)sum/10; average=sum/10; 有何不同?
ex9 請問何謂非對稱性密碼?
請問何謂非對稱性密碼? 並列舉五種以上非對稱密碼的演算法名稱。
何謂public-key密碼系統?....
何謂public-key密碼系統? 何謂secret-key密碼系統? 各列舉五種!
Ex2 請破譯以下enigma密文
ECTJGJMUGEFVHZYLQFMQKKXFYIOSNLOJVSAFYSJLWIYUFJSDER FIDTCKSDFSITUMGOWJLZJZPBKLCIVVDYVICGRBFBYSXMRAOBHZ GQXQXCQAFPSXCGYJTJSHUINWPPLIJISZNNQCBV...
請問這張卡?
請問這張卡所用的資訊技術與資安功能?
ex2
請將執行結果貼出>
Ex2 請問你所使的電腦的規格
請問你所使的電腦,CPU的規格 Cache多大?其他硬體配置...... 另外, "INTEL® XEON PHI™ 處理器 7230F"的大致規格為?
作業 3
請輸出如下 * ** *** **** ***** ******
LinkedList Exercise
輸入字串陣列a[0],a[1],...a[4] 利用Java Class LinkedList 作初一鏈結串列: [ a[0], a[1], a[2], a[4], a[4],a[3],a[2],a[0] ] Hint:可利用方法addFirst, add, remo...
ex1算平均
33, 45, 87, 99, 27 算平均