4 Matching Annotations
  1. Jul 2021
    1. default value

      預設值,為0

    2. The for loop traverses the string. Each time through the loop, if the character c is not in the dictionary, we create a new item with key c and the initial value 1 (since we have seen this letter once). If c is already in the dictionary we increment d[c]

      看到幾次就藉由迴圈加幾次 藉由字典來儲存字元