Skip to content

MrCrLr/algorithms_in_c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms in C

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.


Chapter 2:

Euclid's Algorithm

  • Finding the greatest common divisor of any two numbers.
  • I created a few variations of programs using Euclid's Algorithm.

Chapter 3:

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.

Chapter 4:

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.

Chapter 5:

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.

Chapter 6:

Analysis of Algorithms

  • To be continued...

About

Learning algorithms in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages