Skip to content

Completed s30 Competitive-Coding-1#1357

Open
prenastro wants to merge 1 commit into
super30admin:masterfrom
prenastro:master
Open

Completed s30 Competitive-Coding-1#1357
prenastro wants to merge 1 commit into
super30admin:masterfrom
prenastro:master

Conversation

@prenastro

Copy link
Copy Markdown

No description provided.

@super30admin

Copy link
Copy Markdown
Owner

Interview Problem: Find Missing Number in a sorted array (minheap.py)

Strengths:

  • The min-heap implementation is well-structured with clear method names (parent, leftChild, rightChild, heapify, insert, removeMin)
  • Good use of helper methods and proper encapsulation
  • Clean code formatting with appropriate comments
  • Correct heap property maintenance during insert and removal operations

Areas for Improvement:

  • Fundamental misunderstanding of the problem: The problem asks to find a missing integer in a sorted array, not to implement a heap data structure
  • No attempt at the actual problem: There's no code that addresses finding missing numbers using binary search or any other method
  • Missing the core algorithmic approach: The reference solution uses binary search by comparing (arr[i] - i) values to find where the sequence breaks

Recommendation: To solve the actual problem, you should:

  1. Use binary search on the sorted array
  2. Compare arr[mid] - mid with arr[low] - low to determine which half contains the missing number
  3. Return the first element where the difference changes

VERDICT: NEEDS_IMPROVEMENT


Interview Problem: Design Min Heap (missingnuminarr.py)

The student appears to have submitted code for a completely different problem. The original problem required implementing a Min Heap class in C++ with methods like insert(), removeMin(), and printHeap(). The submitted solution is a Python program that finds a missing number in a sorted array using binary search.

Strengths:

  • The code for the missing number problem is well-structured and efficient
  • Clear comments explaining time and space complexity
  • Good use of binary search for the problem being solved

Areas for Improvement:

  • The solution does not address the assigned problem at all
  • Wrong programming language (Python instead of C++)
  • No implementation of Min Heap data structure
  • No implementation of required heap operations (insert, extractMin, getMin)

The student needs to resubmit a solution that implements the Min Heap class in C++ with the specified operations.

VERDICT: NEEDS_IMPROVEMENT

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