Skip to main content

Posts

Showing posts from March, 2015

Week 11: A trip down memory lane

Hello friends!! How do you do today? Week 11 has just happened and boy did this semester go by quickly. For this week's post, I would like to talk about tracing recursion (or rather recursion, in general), which I talked about in my  week 5 post .  Ah... good ol' recursion. In week 5 we were only responsible for tracing, and without having to code. Back then I thought coding recursive functions was something that I could handle. Now, 6 weeks later, my much older, wiser self agrees, somewhat. Firstly, I would like to say that I am not the hardest worker, nor am I the smartest cookie in the cookie jar. However, I can usually understand something the first time someone explains something to me. With recursion, that was definitely  not the case. It took so much time and way more effort than I thought to understand. The 'recursive thinking' definitely does not come innately to me. With that said, it is not like organic chemistry (which is my personal kryptonite) so I was...

Week 10: The best BST experience

Hello my dear readers! Last week in lecture, we talked about binary search trees (BST) and it was... really cool!  http://www.jade-cheng.com/uh/ta/ics-211-spring-2010/faq/bst.png A binary search tree, when populated with numbers, or anything that can be ordered really, is extremely easy to traverse and find what you need. That's because all the nodes are organized when put into the tree. In the tree displayed above, 20 is the root of this BST. This root has 2 children, 10 and 30. Note that 10 is on the left of 20 and 30 is to the right of 20. This is really important because that is how the tree is organized. If you keep looking at the children of 10 and 30, you'll notice that all nodes left of 10 and 30 are less than the respective nodes and anything to the right would be greater. This makes traversal amazingly quick and efficient.  The lab for that week was on BST insertion and deletion which was quite straight forward since we have learned about trees befo...

Week 9: Getting the Link

Hello readers!! How are you all feeling today? Week 9 has just ended and boy was that test a doozy. A lot of material was included but not much was tested, which made making the cheat sheet a strategic nightmare. Jokes aside, that test was quite fair and I felt that if I studied the labs and lecture material in a greater depth I would have been much more successful.  Last week we learned a little bit about linked lists and it was pretty interesting. http://upload.wikimedia.org/wikipedia/commons/thumb/4/4b/CPT-LinkedLists-addingnode.svg/474px-CPT-LinkedLists-addingnode.svg.png So. Linked lists, they're a nifty little data structure. Just like binary trees and the like a linked list is really just another way to organize data. If you would like to read up on the specifics on linked lists, take a look at  this week's reading . Linked lists are a useful because it allows us to insert and delete nodes (the data) between other nodes without recopying the whole list...

Week 8: Treeeeeeees

Hello readers!!! Last week  we learned all about Binary Trees and finally handed in the ever confusing Assignment 2 (I would not like to relive that recursive mayhem that was Minimax). Would you like to know about binary trees? Well too bad, regardless of your answer, I will be talking about it anyways. (if you do need a bit of a pick-me-up though I would recommend listening to  this song  while you're reading; this one always makes me feel happier!) Now back to binary trees. Binary trees are a special type of tree where each node has a maximum of 2 children. Simple as that! The difference with this tree is that it can come with a left and a right feature where you can specify which of the children you would like to call. With lab 6 came a massive list of functions we could create for a binary tree. It was quite complicated as I am still not completely used to coding recursively. While I am not the best at this new and cool data structure, I am really excited to be ...

Week 7: Let's take it back...

Good morning readers! I hope you all have had a wonderful week back from reading week! I had 2 midterms, so that was fun, but I'm hoping that at least some of you who are reading this had an actual fun week back! Now for this week, our assigned topic is a choice between object oriented programming, recursion, and abstract data types. Coincidentally, I have written a little bit about object oriented programming in Week 6 ! So for this week I shall just direct you back a week. Have an awesome week and good luck on assignment 2 guys! Lana :)