Skip to content

Solution for interview problems#1178

Open
shakthinandana wants to merge 1 commit intosuper30admin:masterfrom
shakthinandana:master
Open

Solution for interview problems#1178
shakthinandana wants to merge 1 commit intosuper30admin:masterfrom
shakthinandana:master

Conversation

@shakthinandana
Copy link
Copy Markdown

No description provided.

@super30admin
Copy link
Copy Markdown
Owner

Interview Problem : Pascal's Triangle (kdiff.py)

It appears there has been a mix-up in the problem you are solving. The problem you provided a solution for is "K-diff Pairs in an Array", but the problem you were asked to solve is "Pascal's Triangle". Please ensure you are working on the correct problem.

For Pascal's Triangle, you need to generate a triangle where each row is constructed based on the previous row. Here are some tips:

  • Start with the first row [1].
  • For each subsequent row, the first and last elements are always 1.
  • The inner elements are the sum of the two elements directly above from the previous row.

Your current solution for K-diff Pairs is well-structured and efficient for that problem, but it does not address Pascal's Triangle at all. Please revisit the problem statement and implement the correct solution.

VERDICT: NEEDS_IMPROVEMENT


Interview Problem: Pairs with K difference (pascalstriangle.py)

Note: The student's solution is for a different problem (Pascal's Triangle) than the one being evaluated (Pairs with K difference). This is clearly a mistake. The student's code should be for the correct problem.

Given that the student's solution is for a completely different problem (Pascal's Triangle) and the problem we are evaluating is "Pairs with K difference", it's impossible to evaluate the correctness, time complexity, space complexity, etc. for the intended problem.

Therefore, the evaluation must conclude that the solution does not address the problem at all.

Let's write the evaluation accordingly.

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