Skip to content

hashing 2#2133

Open
sabyasachibisoyi wants to merge 1 commit intosuper30admin:masterfrom
sabyasachibisoyi:master
Open

hashing 2#2133
sabyasachibisoyi wants to merge 1 commit intosuper30admin:masterfrom
sabyasachibisoyi:master

Conversation

@sabyasachibisoyi
Copy link

No description provided.

@super30admin
Copy link
Owner

  • Strengths:
    • The solution correctly implements the hashmap approach to solve the problem efficiently.
    • The comments are clear and explain the approach well.
    • The time and space complexity are optimal.
  • Areas for Improvement:
    • Avoid modifying the input array. Instead, use a separate variable to track the running sum.
    • The logic for updating the map can be simplified. The if-else block can be replaced with a single line to update the map after checking for the complement.
    • Consider using more descriptive variable names (e.g., count instead of counter).

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