User Tools

Site Tools


journal:fall2019:bmurphy7:week11

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
journal:fall2019:bmurphy7:week11 [2019/11/06 19:34]
bmurphy7
journal:fall2019:bmurphy7:week11 [2019/11/06 22:29] (current)
bmurphy7
Line 5: Line 5:
 ====November 6th, 2019==== ====November 6th, 2019====
  
 +This week we finished our implementation of doubly linked lists by adding a quantity to the list struct. This quantity is to be how many nodes are in our list. This can be useful for data-structures that use a list as the foundation of their processes, like a Queue or a Stack. To add the quantity to the list we had to change some of our functions so as to keep track of it, namely our mklist, insert, append, and obtain functions. Along with this we had to edit our display function so as allow for two more options to be displayed. These new options are to display the nodes as ascii text only, or without separators (aka no more pipes "​|"​). ​ That wasn't are only project in data this week, we also had to implement a Stack data-structure using our doubly linked list as a foundation for it. Implementing the stack wasn't that bad for it was mainly using the list functions to accomplish most of the tasks needed and you only have to rely on setting one part of the stack constantly, that being the top of the stack. The hardest part was mainly making the status codes line up with what we need in the unit tests. Now in discrete we had to do another implementation of the our encoding and decoding function, but this time we had to be given a stride length and a control byte character. Meaning that we read a file for as big as the given stride value, and if there is multiples of the same pattern we print out the control character into the file, so that when we decode the file we will read the characters and print them back out. But if we see the control character we read the next character, which is the stride value, then read the next character, which is how many times the pattern was found, then we read out the next character equal to the stride amount and print them out to the file equal to the amount of times that the pattern occurred.
journal/fall2019/bmurphy7/week11.txt · Last modified: 2019/11/06 22:29 by bmurphy7