2Jul2022: Data Structures

Written by Catt Tung on Jul 2nd, 2022 Views Report Post

Today I completed the section with several exercises with arrays from The Self-Taught Computer Scientist - it's a bit confusing doing arrays in Python - the difference mentioned is that an array in Python is homogenous (must all be the same data type), while the lists are heterogenous (can store multiple data types). While writing one of the solutions I found out you have to import the array module, then declare it with array.array('data type', [values...]). There were also some exercises on sets in the chapter - lists that cannot have duplicates, which makes it cool for some of the coding challenges if they ask you to filter for non duplicates or something like this.

What I'm finding is that the more you know what is out there the more complicated coding becomes. I suppose this is why it's important to be really fluid with doing the fundamentals first before getting to thick in the weeds as you start to know you can do things you might not be able to do. I find this aspect of learning computer programming languages to be very different from learning natural human languages. Although now that I think about it, there's a similarity where you can usually express something in a simpler manner but not the best way to express something, however, I would say in human languages that would be on some level inaccurate, whereas this would just be inefficient in programming (O notation). In any case I think still what I am learning right now is very basic - it's just how much basics are there?!?! I really don't know if it's not just the easier path to go back to school and get a CS degree at this rate because I really value a lot of the things being better at all the CS stuff can bring to the table. I suppose one thing is I have to continue practicing the basics as well while I learn the new methods. I also think these modern languages have so many built in functionalities it's really a lot to learn and remember too. It's just practice though is what I realised from bootcamp - I don't know how I went back at the end to do some challenges and just knew what could be done...it just came from practice so yes it's important to study but also to practice..!!

I started the chapter on Linked Lists - learned a lot actually although I had already watched a few videos and had class on linked lists. I didn't know there were singly and doubly linked lists, as well as circular linked lists. I did know about how insertion and deletion is probably the main advantage of linked lists over arrays, and that search/random access is probably the main disadvantage compared to arrays.

Catt xx

Comments (0)