Skip to content

JA6. Sorting Algorithms

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

1. 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 6th week of this course; it was all about the internal sorting algorithms. I started the week on Sunday by reading the chapter 7 of the book. I read the chapter twice, and I took notes. I also watched the videos that were provided by the lecture and more YouTbe videos that presented the matter from a different perspective.

I did the discussion assignment after that, which was about summarizing the quick sort algorithm; I did the programming assignment which asked for implementing the quick sort algorithm in Java. I also did the self-quiz, which helped me to understand the matter more.

2. Describe your reactions to what you did

The reading was very challenging I read some parts of it more than once, along with watching videos and looking for external visualizations but yet I don’t feel that I fully understand the matter. I think I need to practice more to understand it better.

The programming assignment, however, was relatively easy compared to the assignments of the previous week, where I did not try to be clever and just implemented the algorithm as it was described in the book.

3. Describe any feedback you received or any specific interactions you had. Discuss how they were helpful

There was no assignment from the previous week so I did not receive any feedback. But remembering the feedback from the previous weeks, where I failed to run the Jeliot tool locally and I tried to be clever and wrote very good assignments (about 12 hours spent on each of them).

This week I just submitted simple code that meets the requirements as minimum and simple as possible. I also successfully ran the Jeliot tool locally, but the tool stuck in an infinite loop and my code never finished running. I tried to fix it but I could not, so I just submitted the code as it is, along with a normal version that does not use the Jeliot tool.

4. Describe your feelings and attitudes

I felt challenging while reading the chapter which took me -honestly- more than 20 hours and yet I don’t feel that I fully understand the matter. I felt frustrated with the feedback from the previous weeks so I spent less time on the assignments this week.

5. Describe what you learned

We started learning about the problem of sorting in general, then we studies the three bad sorting algorithms (bubble, selection, and insertion). After that, we studied the merge, shell, heap, and quick sort algorithms. We also studied the bin and radix sort algorithms.

Later we took a step back and compared all of these algorithms side by side, the comparison included asymptotic analysis for time and space complexity, covering the best, average, and worst cases.

6. What surprised me or caused me to wonder?

Some of the algorithms that we used were actually logical, and the average human uses them in their daily life without even knowing that they are sorting algorithms, but some of them are very complex where even after reading the description, watching videos, and studying the code, I still don’t understand how they work.

7. What happened that felt particularly challenging? Why was it challenging to me?

Remembering various algorithms and the differences between all of them along with their implementation was super difficult. I decided that any algorithm code (implementation) is variable and I should not worry about it; I decided to focus on the theory and the asymptotic analysis and the code can be implemented on the spot (later).

8. What skills and knowledge do I recognize that I am gaining?

I am gaining a good understanding about the sorting problem and the various algorithms that can be used to solve it. I am also learning which algorithm to use at each possible scenario.

9. What am I realizing about myself as a learner?

I am realizing that the variable names matter too much, especially when understanding complex algorithms; I was finding it difficult to understand the code because of variables named j,k, r and so on; so I decided to use the same code but with better variable names and it was much easier to understand and follow along.

10. In what ways am I able to apply the ideas and concepts gained to my own experience?

The topic of this week is very interesting for job interviews as almost all companies ask about the sorting algorithms which I should do more practice on.

11. Finally, describe one important thing that you are thinking about in relation to the activity

As I stated earlier, the practice is a key to understand and retain the knowledge of this week. I should practice more on the sorting algorithms.

References