Skip to content

Conversation

@ManishaRana1195
Copy link

No description provided.

@super30admin
Copy link
Owner

  • Strengths:

    • The student has a good grasp of using hash maps to optimize solutions for problems involving subarrays and character frequencies.
    • The code is well-commented, making it easy to understand the thought process behind each solution.
    • The solutions are efficient, with optimal time and space complexity.
  • Areas for Improvement:

    • In SubArraySum.java, the initial check for len == 1 could be simplified. The current check nums[0] == k ? 1 : 0 is correct but could be made more concise.
    • In LongestPalindrome.java, the frequency map could be built more succinctly using frequencyMap.merge(curr, 1, Integer::sum) instead of the if-else block.

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