Skip to content

Conversation

@Mike9330
Copy link

No description provided.

@super30admin
Copy link
Owner

  • merge.java: Your solution works but is not optimal. The problem expects you to leverage the fact that both arrays are already sorted. Try using a two-pointer approach starting from the end of the arrays to merge them in O(m + n) time without sorting.
  • removeDuplicates.java: Your solution is correct but uses extra space. Consider using a two-pointer approach to solve this in-place with O(1) space complexity. This would be more efficient and align with the problem's constraints.
  • searchMatrix.java: Excellent job! Your solution is optimal and correctly implemented. Keep up the good work.
  • General: Your code is clean and readable. Continue to focus on optimizing time and space complexity where possible, especially when the problem hints at a more efficient solution (like sorted arrays in merge.java).

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