Skip to content

Backtracking 1 done#1093

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

Backtracking 1 done#1093
neelp1025 wants to merge 1 commit intosuper30admin:masterfrom
neelp1025:master

Conversation

@neelp1025
Copy link

No description provided.

@super30admin
Copy link
Owner

Strengths:

  • The student has provided two different approaches (iterative and recursive) for the combination sum problem, demonstrating a good understanding of the problem.
  • The code is well-commented and easy to follow.
  • The student correctly handles edge cases, such as leading zeros in the expression add operators problem.

Areas for Improvement:

  • The time complexity analysis for the combination sum problem could be more accurate. The current analysis (O(m^2 * n^2)) is not correct; it should be O(n * 2^(m+n)).
  • For the combination sum problem, the recursive solution could be optimized by avoiding creating new ArrayLists in each recursive call, similar to the reference solution.
  • The space complexity analysis for the combination sum problem could be more precise (O(n * h) instead of O(h)).

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