Skip to content

Conversation

@ashishbadhe97
Copy link

No description provided.

@ashishbadhe97 ashishbadhe97 marked this pull request as draft October 20, 2025 14:33
@ashishbadhe97 ashishbadhe97 marked this pull request as ready for review October 20, 2025 15:18
@ashishbadhe97 ashishbadhe97 changed the title K-diff pairs Competitive_Coding-3 Completed Oct 20, 2025
@super30admin
Copy link
Owner

  • For KDiffPairs.java: Well done! The solution is efficient and correctly handles the edge case where k=0. The use of a hash map to count frequencies is a good approach.
  • For PascalsTriangle.java: The solution has a logical error. The loop should start from i=0 or i=1 to include the first two rows of Pascal's Triangle. Additionally, the condition if(j == 0 || j == i) is correct, but the implementation misses the base cases. You should initialize the first row explicitly before the loop. Also, the variable names could be more descriptive (e.g., prevRow instead of prevList).

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.

3 participants