We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa4a2c0 commit fe34ee4Copy full SHA for fe34ee4
Python/subsequences-with-a-unique-middle-mode-ii.py
@@ -22,9 +22,9 @@ def nC2(x):
22
right[x] += 1
23
left_x_sq = 0 # sum(left[x]^2 for x != v)
24
right_x_sq = sum(v**2 for v in right.itervalues()) # sum(right[x]^2 for x != v)
25
- left_x_right_x = 0 # sum(left[x]*right[x] for x != v)
26
- left_x_sq_right_x = 0 # sum(left[x]^2*right[x] for x != v)
27
- left_x_right_x_sq = 0 # sum(left[x]*right[x]^2 for x != v)
+ left_x_right_x = 0 # sum(left[x]*right[x] for x != v)
+ left_x_sq_right_x = 0 # sum(left[x]^2*right[x] for x != v)
+ left_x_right_x_sq = 0 # sum(left[x]*right[x]^2 for x != v)
28
for i, v in enumerate(nums):
29
left_x_sq -= left[v]**2
30
right_x_sq -= right[v]**2
0 commit comments