Skip to main content

CST370: Exploring Efficient Data Structures This Week

 This week I focused on understanding different data structures that improve search efficiency, including AVL trees, 2-3 trees, heaps, and hashing. I learned how AVL trees maintain balance using balance factors and rotations, and how to identify when rotations like left, right, or double rotations are needed after insertion. For 2-3 trees, I studied how nodes can store one or two keys and how promotions work to keep the tree balanced with all leaves at the same level.

I also learned about heaps and how they are implemented as complete binary trees. I practiced operations such as inserting elements, deleting the maximum, and building a heap using both top-down and bottom-up approaches. Understanding how heaps are represented using arrays helped me see how parent and child relationships are calculated using indices. I explored heap sort and how it repeatedly removes the maximum element to produce a sorted sequence with O(n log n) time complexity.

For hashing, I learned how hash functions map keys to table indices and how collisions occur when multiple keys map to the same location. I studied collision resolution methods such as separate chaining and linear probing, and I learned how load factor affects performance. I also learned why rehashing is needed when the table becomes too full and how resizing to a larger prime number helps reduce collisions.

Working on HW5 helped reinforce these concepts because I had to implement heap operations and a hash table with linear probing and rehashing. I spent time testing edge cases, debugging commands like tableSize, and verifying load factor calculations. I also practiced quiz questions to strengthen my understanding of how these data structures behave in different scenarios. Overall, this week helped me connect theory with practical implementation and improved my confidence in working with efficient data structures.

Comments

Popular posts from this blog

Confessions of a Chronically Confused Note-Taker

Part 1: Review and Reflect Learning Strategy One of my strengths is making and revising a study schedule. I am good at planning my time and organizing my tasks, which helps me stay on track. I also do well at finding the main idea and important details when I read. This skill helps me understand the most important parts of the material. However, I need to improve in a few areas. Taking notes is hard for me because sometimes I write too much or miss key points. I also struggle with outlining textbooks since I am not always sure what to include. Another challenge for me is answering multiple-choice questions. Sometimes I overthink the answers and doubt myself. Part 2: Preview Time Management Skills Link:  https://docs.google.com/spreadsheets/d/1KNpOCEeEtB0whGXmduCl-BP1txBSaqMnxBG3fvfV-AE/edit?usp=sharing Part 3: Project Management Basics I watched three videos about project management. They helped me understand important concepts. The first video was about the basics of project man...

Balancing Beaches and Bytes: My Week 1 in the CS Online Program

Before the first week of my CS Online course started, I was happy to connect with my teammates early. I really enjoyed working with them. We shared ideas, created designs, and had fun being creative together. It was a great start, and working as a team helped us a lot. To be honest, when Week 1 of the course started, I was in Hawaii on vacation with my family. It’s not a usual way to begin a new class. At first, I wasn’t sure if it was a good idea. This course is very important to me because it helps me prepare for my future, and I didn’t want to fall behind. But at the same time, I knew that spending time with my family and making special memories in Hawaii was also important. So, I gave myself a challenge: Can I enjoy the vacation and still keep up with my school work? Here's a photo taken from my drone.  I’m really happy with how this course is set up . It has both group work and individual assignments. I enjoy working on my own because I can focus, but I also like working w...

Tourist by Day, Techie by Passion: My Week 4 Snapshot

My educational goal in the Computer Science program is to become a skilled software engineer who can design and build innovative, efficient software solutions using both strong programming skills and AI tools responsibly. I want to complete my degree with a solid understanding of core computer science principles, such as algorithms, data structures, and system design, so I can solve complex problems without relying only on AI. After graduation, I aim to work on projects that improve people’s lives by combining creativity and technology, constantly learning new skills to stay ahead in the fast-changing tech world. This goal excites me because I see myself growing as a confident, adaptable developer who uses both traditional knowledge and AI to create a meaningful impact. My career goal is to be a software engineer who makes intelligent and helpful technology for people. I want to work at a company that uses AI and new tools carefully and responsibly. I want to grow as a leader who helps...