Homepage
Open in app
learning note
Sign in
Get started
Tagged in
Coding
learning note
My learning notes.
More information
Followers
80
More, on Medium
Coding
Aaron
in
learning note
Apr 5, 2020
Leetcode 1406: Stone Game III
Difficulty:Hard
題目
有一堆stones排成一列,Alice跟Bob輪流拿,只能從最左邊開始,每個人每次拿1~3堆,假設Alice先拿且大家都是理性的,試問最終誰獲勝?
分析
輪到某人要從第i堆開始拿,不管前面怎麼組合,也不管這人是Alice或是Bob,從第i堆開始拿的最終收益是一樣的。
Read more…
1
Aaron
in
learning note
Apr 3, 2020
Algorithm: Aho–Corasick algorithm (AC自動機)
在文章中尋找多種句子。
Read more…
11