Day #13: Hash Code Heroes: Where Collisions Meet Elegance 🗝️

Today we implemented a complete hash table data structure from scratch, focusing on proper collision handling and clean code practices. The code changes from this session can be found here. Day 13 Summary Overview Built a generic hash table implementation with chaining-based collision resolution while maintaining clean code principles and comprehensive testing practices. Environment & Tools Maven project structure JUnit 5 testing framework Clean package organization Proper Git workflow Concepts Covered Hash Table Implementation Generic type support for keys and values Collision resolution through chaining Dynamic resizing based on load factor Proper null handling Clean API design Core Operations Put with collision handling Get with chain traversal Remove with chain maintenance ContainsKey implementation Size and clear operations Iterator Implementation Bucket and chain traversal Complete collection iteration Proper exception handling Clean iterator pattern Testing Practices Comprehensive test coverage Edge case handling Collision testing Iterator verification Clear test organization Implementation Progress Created complete HashTable interface Implemented SimpleHashTable with all operations Added proper collision handling Established iterator support Built comprehensive test suite Key Takeaways Hash table fundamentals and collision handling Clean code in data structure implementation Importance of comprehensive testing Iterator pattern implementation Generic type constraints and usage Next Steps Ready to explore: ...

February 21, 2025 · 2 min · 277 words · Çağlar Turalı

Day #10: Tree of Knowledge: Roots of Binary Wisdom 🌳🧩

Today we delved into the world of Binary Search Trees, implementing a robust BST data structure while strengthening our testing practices. The code changes from this session can be found here. Day 10 Summary Overview Implemented a comprehensive Binary Search Tree data structure with proper testing methodology, covering core tree operations and utility methods. Environment & Tools JUnit 5 for testing framework Proper test organization with @DisplayName annotations Clean separation of test and implementation code Concepts Covered Binary Search Tree Implementation Generic type support with Comparable constraint Core BST properties and invariants Node structure and relationships Recursive tree operations Tree Operations Insertion maintaining BST property Deletion handling all cases (leaf, one child, two children) Three types of traversals (in-order, pre-order, post-order) Search/contains operation Utility Methods Size calculation Tree height computation Min/max value finding BST property validation Testing Practices Clean test organization Descriptive test naming Test isolation with @BeforeEach Edge case coverage Implementation Progress Created complete BST implementation Added comprehensive traversal methods Implemented utility operations Established proper test suite Key Takeaways BST provides efficient searching and ordering Recursive solutions for tree operations Importance of maintaining BST invariants Value of proper test organization Benefits of descriptive test naming Next Steps Ready to explore: ...

February 18, 2025 · 2 min · 268 words · Çağlar Turalı

Day #9: Building Better: From Queue to Quality 🏗️✨

Today marked a significant shift in our development approach, moving from basic implementations to professional-grade project structure and testing practices. The code changes from this session can be found here. Day 9 Summary Overview Implemented a generic queue data structure while establishing professional development practices through proper build system setup and testing methodology. Environment & Tools Set up Maven build system Configured JUnit 5 for testing Established proper project structure Added Git ignore patterns for Maven Concepts Covered Queue Implementation Generic type parameters Linked list-based structure Basic queue operations (enqueue/dequeue) Null handling and edge cases Modern Java Features Generic type implementation Iterator pattern Stream API integration Interface implementations (Iterable, Streamable) Professional Development Maven project configuration Dependency management JUnit test organization Clean project structure Testing Practices Test lifecycle management (@BeforeEach) Clear test naming conventions Comprehensive test cases Edge case coverage Implementation Progress Created SimpleQueue implementation Added queue operations Implemented iteration support Integrated stream capabilities Established comprehensive test suite Key Takeaways Professional project structure importance Value of proper testing methodology Build system benefits Clean separation of concerns Iterative development approach Next Steps Ready to explore: ...

February 17, 2025 · 2 min · 241 words · Çağlar Turalı