pyton code to remove_duplicates#194
Conversation
|
🎉 Welcome to Hacktoberfest 2025, @kaiju-no-9! 🎃 Thank you for your first contribution to our DSA repository! Here's what happens next: 🔍 Automatic Checks
📋 Next Steps🎯 Great job! Your code compiled successfully. Maintainers @Karanjot786 and @Pradeepsingh61 will review your PR soon. 🎁 What You Get
💡 Tips for Success
Welcome to the community! 🚀 |
🤖 Automated PR Status🔍 Code Validation✅ Passed - File naming and structure look good! 🧪 Compilation Tests✅ Passed - All code compiles successfully! 📋 Overall Status🎉 Ready for Review - Your PR has passed all automated checks! This comment was generated automatically. Checks will re-run when you push new commits. |
|
modification done to Python/algorithms/arrays |
Karanjot786
left a comment
There was a problem hiding this comment.
Hi @kaiju-no-9 welcome to our DSA code repo! and thanks you for this PR and it is good to go and now @Pradeepsingh61 you can merge this PR
____summary ____
function's logic is straightforward and efficient:
It creates a map (similar to a dictionary) of all the numbers in the input list.
The keys of this map are the numbers from the list, and the values are their respective counts.
Finally, it uses a list comprehension to iterate through the frequency map and collect all numbers whose count is greater than 1.
____Complexity Analysis ___
Time Complexity: O(n)
Space Complexity: O(k)
Test cases
arr1: [1, 2, 3, 6, 3, 6, 1]
Expected: 1, 3, 6
arr2: [2, 1, 5, 4, 1, 3, 5]
Expected: 1, 5
arr3: [2, 3, 8, 3, 13]
Expected : 3
... is this what was expected to do???...