summaryrefslogtreecommitdiff
path: root/sources
AgeCommit message (Collapse)Author
2019-06-12Binary Search Tree check harder version done!HEADmasterHaidong Ji
2 simple changes were all needed :)
2019-06-12Binary Search Tree check done!Haidong Ji
Easy after Java version is done. I'm happy that I did this in 3 languages (Java, Python, C++). I can really tell that Python is more succinct, whereas Java is really verbose. Fun stuff :)
2019-06-09tree traversal done (in/pre/post) ordersHaidong Ji
Not too bad since I worked it out in Java first
2019-03-17Rabin-Karp string search done!Haidong Ji
Not too bad to convert Java to Python. Converting the for loop and playing indexing is interesting, good exercise.
2019-03-12Hashing with chains done!Haidong Ji
I was tricked by how to create a list of empty list. This line solved the problem: self.elems = [[] for i in range(n)]
2019-03-09Phone book done!Haidong Ji
2019-03-04Merging tables done.Haidong Ji
Not too bad since I worked it out in Java. A bit surprised that Python class is used in starter file, but I made it testable and wrote test cases. All is well.
2019-02-21Priority queue parallel job processing done!Haidong Ji
Not too bad since I worked it out in Java. Good practice of heapq module in Python! A lot of fun :)
2019-02-17Build heap done!Haidong Ji
Not too bad, since the Java version has been worked out.
2019-01-29Network Packet done!Haidong Ji
It's not too bad, since I worked things out in Java first. 2 things are of note: 1. Java Deque's pop is Python Deque's popleft. 2. I didn't use an iterator to remove items. It seemed to work fine.
2019-01-10Tree height done!Haidong Ji
Fun exercise. Interesting to experience the mentality change of creating classes in Python, after first creating it in Java. I removed the parent property in Python class since it's not used. Object aliasing caused a bug that took me a bit to figure out.
2019-01-02Check bracket done!Haidong Ji
Strict TDD is not possible, at least the type I'm used to through Eclipse PyDev, where I write tests first, and rely on PyDev to generate files/function stubs. Bummer, but I decided to stick with PyCharm just to learn it.