ebonnecab / core-data-structures Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Your is_subset
function uses a repeated variable element
. Because of this, it seems that your is_subset
will always return True
.
Good work with this submission. Your written tests are very good. They test a lot of different cases and check the size property often. I would suggest that you could test more edge cases, like sets with different types of stored data or much larger sets, but otherwise this is good.
insert_at_index
and replace
do not pass. insert_at_index
seems to handle the base case, but what happens if the node is at the head or tail? In replace
, the error never seems to get raised. The error relies on prev_node
to be set, but prev_node
doesn't seem to get changed in replace
. Even if prev_node
was correctly set, would it ever trigger the conditional to raise an error?Good work on this, Ebonne! Your code is passing all tests.
This is not required, but you might consider going back through this class and adding time/space complexity annotations for the remaining methods. Not only will this be a good review, but it will also help deepen your knowledge of how hash tables work.
If you have Pylint installed you might have noticed that it gets upset when you have unused variables. You can replace unused iterating variables with underscores to improve how your code reads.
Your length method could be refactored to just return self.size
and drastically improve the runtime.
Good work on getting your palindromes tests passing. The helper function to clean your text is a good idea, but it increases both your time and space complexity before you even check if you have an empty string. Also, it eliminates the possibility of checking early on if the given text is a palindrome and exiting early before altering the string.
The test that is failing in your strings_test.py
was not written correctly. Refactor the test and everything should pass. You haven't yet refactored to avoid duplication and you need to annotate your time and space complexities.
midpoint
and the minus sign on line 79, and the space between the commas and left
on line 80.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.