Picks up where Two-sum indices left off.
Same setup as two-sum, but count how many index pairs (i<j) sum to target.
Write count_pairs(nums, target).
Starter:
def count_pairs(nums, target):
Today's medium arrays challenge. Solve it in your browser.
Picks up where Two-sum indices left off.
Same setup as two-sum, but count how many index pairs (i<j) sum to target.
Write count_pairs(nums, target).
Starter:
def count_pairs(nums, target):

I recently shared what I learned about lists, and while I was getting comfortable with them, I came...

It was a less-than-stellar start to the week in my challenge of betting $100 every day for a year, going 1-2 for a loss of $49.…

Our hot streak continues into day 204 of betting $100 every day for a year after posting another profitable performance on…

Another week of my challenge of betting $100 every day for a year is in the books, and we are now up over $200 year-to-date. We…

After a few hot days, we took an unfortunate big step back on Monday, suffering a dreaded reverse sweep to lose all $100. We got…

We took a step in the right direction on Tuesday, going 2-2 but managing a profit of around $13 thanks to cashing our two $30…