Navigating Data Structures- Challenges and Insights from Graph Applications
The lab was about writing a code for an adjacency matrix. This would be achieved by incorporating the principle of data structures. In the code, the shortest path was defined to establish the movement from the first node to the next until the last node. This definition or declaration was made in a public class, and then the matrix was initialized. Initializing the matrix was defining where the matrix would start and end. A return path was established. The code checked on paths; if a path was identified, nodes would be added to the path one at a time. Data structures and algorithms are used to solve problems. The problem in lab 5 was creating an adjacency matrix for nodes on a delivery route.
One of the challenges experienced during the writing of the adjacency matrix code was to design a finite, correct, and definite algorithm. The three components were essential in ensuring that the program returned the desired output (Gebremedhin, 2019). For the algorithm to be finite, it had to have a limited number of steps. The algorithm also had to have clear steps that would not result in misinterpretation or ambiguity during code execution. Correctness of the algorithm was required to ensure that the program had an acceptable output. Proper initialization of the matrix facilitated the finiteness of the algorithm. Describing how to check for paths and how to return when a path was not found while adding nodes whenever there was a path enabled the algorithm to have definiteness. The correctness of the algorithm was achieved by comparing the output and fine-tuning the algorithm until the output was acceptable. The three principles of an algorithm were very useful in completing the lab. I intend to continue incorporating all the principles of data structure algorithms in my future coding activities to ensure that my code fully solves the problem at hand.
References
Gebremedhin, G. H. (2019, December 25). (PDF) The core concepts of data structure and algorithm analysis. Retrieved from https://www.researchgate.net/publication/338159701_The_Core_Concepts_of_Data_Structure_and_Algorithm_Analysis
ORDER A PLAGIARISM-FREE PAPER HERE
We’ll write everything from scratch
Question
Complete the Wk 5 – Apply: Challenge Activities prior to completing this reflection. This week’s challenge activities enabled you to use data structures, such as graphs and adjacency lists.
Write a 1- to 2-page reflection that describes the challenges you faced while completing the activities. How did recalling the definitions and concepts related to data structures and algorithms help you complete the activities? How will your understanding of these concepts and terms assist you in your future courses and career?