Solved find first missing number in an array#1345
Solved find first missing number in an array#1345anirudhv98 wants to merge 1 commit intosuper30admin:masterfrom
Conversation
Interview Problem: Find Missing Number in a sorted array (Problem1.cs)Strengths:
Areas for Improvement:
VERDICT: NEEDS_IMPROVEMENT Interview Problem: Design Min HeapYour solution appears to be for a different problem (likely "Find the Missing Number" or similar) rather than the "Design Min Heap" problem. For the Min Heap problem, you need to create a class that represents a min heap with methods to insert, extract the minimum, and possibly get the minimum without removal. The solution should include:
I recommend revisiting the problem statement and implementing the Min Heap from scratch. You can start by defining a class with a constructor that initializes the heap array. Then, implement methods for insert, extractMin, and getMin. Remember to use helper functions for parent, leftChild, rightChild, and swapping elements. Also, consider edge cases like an empty heap or full heap. Your binary search solution is well-written for the problem it addresses, but it's crucial to read the problem carefully to ensure you're solving the correct one. If you have any questions about heap operations, feel free to ask for clarification. VERDICT: NEEDS_IMPROVEMENT |
Completed competitive coding 1 - please review