Skip to content

🟢 Port problem 1512 (Number of Good Pairs) from Python to C++23 - #11

Open
AF2B wants to merge 2 commits into
chore/cpp23-migrationfrom
feat/cpp-1512-number-of-good-pairs
Open

AF2B wants to merge 2 commits into
chore/cpp23-migrationfrom
feat/cpp-1512-number-of-good-pairs

Conversation

@AF2B

@AF2B AF2B commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Converts python/1512.py to C++23 at solutions/1501-1600/1512-number-of-good-pairs/.
  • Keeps the original brute-force O(n^2) approach and adds an O(n) frequency-counting optimized one.
  • Removes the now-converted python/1512.py.

Base is chore/cpp23-migration (#4) — retarget to main once that lands.

Test plan

  • CI (build & test, static analysis, format check) passes.

Replaces python/1512.py with
solutions/1501-1600/1512-number-of-good-pairs/. Keeps the brute-force
O(n^2) approach and adds an O(n) frequency-counting optimized one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants