This week I will be revisiting an earlier SLOG to talk about whether my views have changed or developed since then. I will be revisiting week 5's SLOG about Linked Lists.
My view has changed to prefer just using a normal list for Queues and Stacks rather than Linked Lists. The reason for this is that we have to import or implement the Linked List class into whatever project we are working on rather than just using the inbuilt list. Basically, I am too lazy to import it for assignments, since we are required to upload specific files.
I do wonder if I would've saved time on assignment 2's code if I used Linked List for the Stack and Queue in Depth-first search and Breadth-first search. This is because one of the things that I claimed in week 5 was that it is much faster in for large lists. Specifically, I claimed O(n) growth for a Linked List based Stack and Queue contrasting to O(n²) for the list based which I used.
I don't think this mattered too much though since I ended up using deque for the Stacks and Queue and it likely used some kind of efficient data structure. Perhaps even Linked Lists!
No comments:
Post a Comment