Skip to content

Conversation

@PrasiddhShah
Copy link

No description provided.

@super30admin
Copy link
Owner

Strengths:

  • Good understanding of binary search concept in Problem1.java.
  • Proper handling of edge cases in Problem1.java.
  • Code is well-commented and structured.

Areas for Improvement:

  • In Problem1.java, the while loop condition should be while (high - low > 1) to avoid infinite loops. The updates to low/high should also be adjusted to ensure convergence.
  • The minHeap implementation in Problem2.java has several issues:
    • The minHeapify method incorrectly swaps with the left or right child without comparing which is smaller.
    • The minHeap method has incorrect loop conditions and indexing.
    • The remove method does not handle the heap property correctly after removal.
  • For Problem2.java, it would be helpful to study heap operations more thoroughly and implement them correctly.

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