Skip to content

Conversation

@meetrpatels30
Copy link

No description provided.

@super30admin
Copy link
Owner

  1. h-index Solution: Your solution is correct and demonstrates a good understanding of binary search. However, the reference solution shows a more optimal approach with O(n) time complexity. Consider exploring the bucket sort approach for problems where counting frequencies can lead to linear time solutions.
  2. rotate-array Solution: Excellent use of in-place reversal and modular arithmetic to handle large k values. The code is clean and efficient.
  3. trapping-rain-water Solution: Well-implemented two-pointer approach. The logic is clear and the solution is optimal.
  4. General Feedback: Your code is well-commented and easy to follow. Keep up the good work! For future problems, always consider if there's a way to achieve linear time complexity without sorting, as sorting often introduces an O(n log n) bottleneck.

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