t0ri-make-school-coursework / core-data-structures Goto Github PK
View Code? Open in Web Editor NEWCS 1.3
License: MIT License
CS 1.3
License: MIT License
Code Review Row Topics: Readability & Formatting, Organization & Modularity, Effectiveness of Solution, Testing & Error Handling.
else: raise KeyError('Key not found: {}'.format(key))
) and lines 145-148 (if new_size is None
& elif new_size is 0
) represent this very well.Assessed with this rubric.
Good work on this assignment. Your base conversion algorithms looked pretty good. You had good edge case handling in your encode function.
A few suggestions:
Both encode
and decode
could have used more comments to help make them more readable.
Also, you might consider moving your old code out into another file instead of having large chunks of commented out code in the middle of this file.
Your binary search algorithms look good. I liked that you used pseudocode to write the functions. I would suggest transforming that pseudocode into comments throughout your function.
Good work on this, Tori! 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.
I'm glad you caught the underscore thing with unused iterating variables. It makes your code look really good.
If you want, your length method could be refactored to just return self.size
and drastically improve its runtime.
Good work on this assignment. Your tests are well written and the comments were helpful. I would have liked to see more data types tests (e.g. NoneTypes, floats, etc).
Good job for doing two different types of sets. I'm sure you learned a lot by doing that!
Your palindromes functions are passing all tests, but they could be improved. I like the idea of using helper functions break up the different bits of logic. But you are increasing the time and space complexity of your functions by altering the entire string up front. A better approach would be to iterate over the text and skip non-letter characters as you go.
Your time complexities for find_index
and find_all_indexes
make sense, but they are not quite right. I believe that your space complexity analysis for find_all_indexes
is correct, but the others don't seem right. Good work adding additional tests.
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.