Complete Cmopetitive-Coding2#1171
Open
paridhimalviya wants to merge 1 commit into
Open
Conversation
Owner
Interview Problem : Two elements sum to target (TwoSum.swift)Your solution is efficient and uses a good approach with a hash map to achieve O(n) time complexity. However, there are a few areas for improvement:
Here's an improved version in Swift: VERDICT: PASS Interview Problem: 0-1 Knapsack Problem (0-1Knapsack.swift)Your solution demonstrates a good understanding of the problem and both the recursive and DP approaches. Here are some strengths and areas for improvement: Strengths:
Areas for Improvement:
Overall, your solution is correct and efficient for the DP part. With minor adjustments to improve flexibility and code structure, it would be even better. VERDICT: PASS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem 1 - Two elements sum to target
Problem 2 - : 0-1 Knapsack Problem