More Key Concepts - Sorting and Graphs

This week, I strengthened my understanding of more key algorithmic concepts. In the programming assignments, I was tasked to write two different approaches to partition an array so that all negative numbers appear before the positive ones. The first used a two-pointer method that swapped elements from both ends. The second used a single-pass scanning approach to shift negatives forward. I also got the opportunity to implemented Kahn’s Algorithm for topological sorting. This required building an adjacency list, calculating indegrees, and using a priority queue to process vertices in ascending order.  

The material this week covered topics like Quicksort partitioning, Binary Search Trees, and graph traversal algorithms. I was tasked to practice identifying the results of the first partitioning step in Quicksort and analyzing time complexities for finding the minimum key in a BST. The quiz also tested understanding of DAGs and topological sorting, including how to determine indegrees and select starting nodes. This week had a good balance of theory and implementation. Writing the programs solidified the logic behind array and graph manipulation, and the material covered ensured I could reason through each step.

Comments

Popular posts from this blog

The End of the Byte Trail

Reflections on Algorithms

Refining Documentation and Planning Final Deliverables