iT邦幫忙

2025 iThome 鐵人賽

DAY 11
0

題目介紹:

  • 編號:383
  • 類型:String ,Hash Table , Counting
  • 難度:easy
  • 題目連結:https://leetcode.com/problems/ransom-note/description/
  • 描述:給兩個字串:ransomNote 和magazine, 判斷是否可以用magazine的字母去「構造」出ransomNote 。每個字母在 magazine 中最多只能用一次。因此,對於ransomNote 中的每個字母,要確認 magazine 中有足夠數量的該字母。

解題成功畫面:
https://ithelp.ithome.com.tw/upload/images/20250925/201788402sVRcY0Hgj.jpg

notion截圖:
https://ithelp.ithome.com.tw/upload/images/20250925/20178840gfp6Gbtmwj.jpg
https://ithelp.ithome.com.tw/upload/images/20250925/20178840fmv5YTeoEb.jpg


上一篇
<DAY10> - Best Time to Buy and Sell Stock
下一篇
<DAY12> - Valid Parentheses
系列文
「用 LeetCode 挑戰 30 天,打造扎實的程式邏輯力」- 結合Notion記錄學習筆記13
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言