I'm working on learning to code algorithms from the book by Robert Sedgewick and I am using the C programming language. Here's the stuff I'm currently playing around with. I'll try to update this as I go.
Euclid's Algorithm
- Finding the greatest common divisor of any two numbers.
- I created a few variations of programs using Euclid's Algorithm.
Elementary Data Structures
- Completed all exercises for this chapter. Linked lists are much clearer to work with than parallel arrays in my opinion. The pushdown stack with parallel arrays is something I will need to review further, but I'm looking forward to expanding this comfort with stacks and queues to the next chapter on trees.
Trees
- Trees are just fascinating structures. I have not quite figured out what I will do with them, but the fact that they can get close Big O log of N time in find, insert, and delete operations is cool.
- I followed through all the exercises in the book but then added a few of my own to explore my interests further. I still felt like I wasn't grasping everything as deeply as I wanted to so I have continued practicing with code. I ended by writing an AVL tree which is a tree that dynamically self-balances. I also included a parent pointer in each node to possibly improve iterative operations, or maybe just because I wanted to see how confusing it would get for me.
Recursion
- This is starting to get quite difficult now at times, but it's also really fun when I finally understand something. I usually have to write things down on paper a lot before I understand. I do a lot of repetition. Thanksfully, I like spending time with this making baby steps forward. I am still waiting for a cool project idea to come to mind but I don't have one yet. However, I did start getting a little out there trying to create a little visualization tool for trees. THat spawned out of control into designing 8 bit pixel emojis and creating a bitmap generation program called "btvt". I'm not sure if I'll continue but the idea was to be able to feed it a binary tree structure and it would draw it on the screen for me.
Analysis of Algorithms
- To be continued...