problem
solution #1: 双层循环;
code
solution #2: 使用哈希表;
code
注意:
1. 没明白哈希表计算res的方法;
参考
1. leetcode_1512. Number of Good Pairs;
完
problem
solution #1: 双层循环;
code
solution #2: 使用哈希表;
code
注意:
1. 没明白哈希表计算res的方法;
参考
1. leetcode_1512. Number of Good Pairs;
完