hash map1 [LeetCode] 383. Ransom Note, C Solution 1 using Hash Map Intuition Declare Hash Map represents charactoer 'a' to 'z' (size 26) Increase Hash Map Index which is in Magazine Note Decrease Hash Map Index which is in ransom Note If one of value in Hash Map under 0, Return false (it means character of Magazine Note doesn't represent ransom Note) When you use index, use should consider ASCII number of 'a' at inital index (97) bool .. 2022. 12. 30. 이전 1 다음