We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1a6451 commit 7cfe73bCopy full SHA for 7cfe73b
src/main/java/com/fishercoder/solutions/_1711.java
@@ -12,7 +12,8 @@ public int countPairs(int[] deliciousness) {
12
long pairs = 0;
13
for (int i = 0; i < deliciousness.length; i++) {
14
int power = 1;
15
- for (int j = 0; j < 22; j++) {//we only need to go up to 21 since one of the constraints is: 0 <= deliciousness[i] <= 2 to the power of 20
+ //we only need to go up to 21 since one of the constraints is: 0 <= deliciousness[i] <= 2 to the power of 20
16
+ for (int j = 0; j < 22; j++) {
17
if (map.containsKey(power - deliciousness[i])) {
18
pairs += map.get(power - deliciousness[i]);
19
pairs %= MODUALR;
0 commit comments