Skip to content

Completed both the problems - #1892

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

Completed both the problems#1892
lakshmidurgat wants to merge 1 commit into
super30admin:masterfrom
lakshmidurgat:master

Conversation

@lakshmidurgat

Copy link
Copy Markdown

No description provided.

@super30admin

Copy link
Copy Markdown
Owner

Find All Numbers Disappeared in an Array (find_all_numbers_disappered_in_an_array.java)

[Constructive feedback for the student]

VERDICT: PASS


max and min (game_of_life.java)

It appears you have submitted a solution for a different problem (Game of Life) instead of the "max and min" problem. Please review the problem statement carefully:

The "max and min" problem requires you to:

  • Find both the minimum and maximum values in an array of length N
  • Do so using fewer than 2*(N-2) comparisons

The optimal approach (as shown in the reference solution) involves:

  1. Processing elements in pairs
  2. For each pair, doing one comparison to determine which is smaller and which is larger
  3. Then comparing the smaller with the current min and the larger with the current max (2 more comparisons per pair)
  4. This results in approximately 3*(N/2) + 1 comparisons instead of 2*(N-1) comparisons

Please resubmit with a solution that actually addresses finding the minimum and maximum in an array.

VERDICT: NEEDS_IMPROVEMENT


Game of Life

Ewhy this verdict?

The student's solution is correct, has the same time complexity as the reference solution, and uses the same in-place approach with state encoding. The code is well-structured and readable. The only minor issue is the inclusion of an unrelated file in the submission, but the actual solution is correct.

VERDICT: PASS

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