JA3. Lists, Stacks, Queues, and Dictionaries¶
Statement¶
The Learning Journal is a tool for self-reflection on the learning process. In addition to completing directed tasks, you should use the Learning Journal to document your activities, record problems you may have encountered and to draft answers for Discussion Forums and Assignments.
Your learning journal entry must be a reflective statement that considers the following questions¶
Describe what you did. This does not mean that you copy and paste from what you have posted or the assignments you have prepared. You need to describe what you did and how you did it¶
- This was the third week of this course it talked about some of the most fundamental data structures used in everyday programming.
- I started the week by trying the self-quiz to give me an idea of what I know and what I need to learn.
- I then challenged myself to complete the programming assignment without looking at the solution, but I found it very difficult to do so.
- Then I read the reading assignment and watched the videos to get a better understanding of the material.
- Then I completed the discussion assignment and tried the programming assignment again, and it was much easier.
Describe your reactions to what you did¶
- When I first tried the self-quiz and the programming assignment, I thought this week is going to be super complex and I would not be able to complete it.
- However, While reading the material I felt the dots connecting and it was a nice feeling.
- Although it took me the entire week from Sunday to Wednesday, the information was logically flowing and the second book (Barnett & Del Tongo, 2008) took me less time to read than the first one (Shaffer, 2011).
Describe any feedback you received or any specific interactions you had. Discuss how they were helpful¶
- I did not receive a particular interesting feedback my self, but I saw some of my classmates’ feedback and it was interesting to see how they approached the problem.
- I saw lots of real-life (out of programming) examples to use stacks and queues which I will never think of them my self.
- Stacks are library organization, undo/redo functionality, tokenizing and parsing, and memory allocations.
- Queues are used in buffering, scheduling, and asynchronous processing.
Describe your feelings and attitudes¶
- The flow of topics was interesting, and how the author started with the concept of a list and smoothly transitioned to stacks, queues, and dictionaries.
- I feel more confident around the concepts of algorithm analysis that was introduced in the previous week, since the text analyzed every operation in terms of time and space complexity.
- I feel that this topic is very important and the next chapters will rely on it heavily; but this also mean that there is more chance that I will gain more knowledge and skills on this topic.
Describe what you learned¶
- The text started by introducing the concept of a list and how it is used in programming, and the expected operations and properties of a list.
- Then the text discussed ways to implement a list, including arrays, singly linked, and doubly linked lists.
- For each implementation, the text discussed the time and space complexity of each operation, and then compared it with the other implementations.
- The text then discussed the concepts of stacks and queues, and how they are implemented using arrays and linked lists.
- Lastly, dictionaries were discussed, and how they are implemented using arrays and linked lists.
What surprised me or caused me to wonder?¶
- I was surprised by how easy the concepts of stacks and queues were, and how they are just a list with some restrictions on the operations.
- I also realized that I was using stacks and queues in my code without knowing or explicitly using their terminology.
What happened that felt particularly challenging? Why was it challenging to me?¶
- The dictionaries part was relatively challenging compared to the rest of the topics.
- I believe that challenge comes from the fact that I am familiar with dictionaries from python and javascript, where both have different definition, operations, and properties from the dictionaries discussed in the text.
- It was hard taking the existing definition of dictionaries outside of my mind while reading the text.
What skills and knowledge do I recognize that I am gaining?¶
- I gained more knowledge about algorithm analysis and Big-O notation.
- I gained formal definitions of lists, stacks, queues, and dictionaries (building on the my previous knowledge of them).
- I gained the ability to differentiate and compare between the four data structures mention in the text, and then differentiate and compare between the different implementations of each data structure in terms of time and space complexity.
What am I realizing about myself as a learner?¶
- I realized that the practical knowledge without the concrete theoretical fundamentals that give you a set of comparison tools that can you sue to it tp solving.
In what ways am I able to apply the ideas and concepts gained to my own experience?¶
- I do programming a lot at work, we code javascript which includes a few data structures like arrays and objects, and I can see how the concepts I learned this week can be applied to my work.
- I look differently to arrays that may be used as stacks, queues, or dictionaries.
- I also started to look at the code I’m writing in the analysis eye, and I’m trying to figure out the time and space complexity of the code I’m writing when n is large.
Finally, describe one important thing that you are thinking about in relation to the activity¶
- The important thing that sacks and queues are super efficient that they are at the core of every operating system out there, and I bet they are used in every program that ever existed.
References¶
- Shaffer, C. (2011). A Practical Introduction to Data Structures and Algorithm Analysis. Blacksburg: Virginia. Tech. https://people.cs.vt.edu/shaffer/Book/JAVA3e20130328.pdf. Chapter 4.
- Barnett, G. & Del Tongo, L. (2008). Data Structures and Algorithms: An Annotated Reference with Examples. Chapter 6: Queues.