Day 31/100 Writing up the assignment…

Anasthasia Manu
1 min readMay 16, 2020

Thankfully I should be back to the daily coding update (finished my hurr yaaay only took 15 hours of blood, sweat and tears to complete my attempt at box braids). Anyhoo, In line with my plan, I have managed to implement my Deque solution, just need to write tests to ensure apis work the way they’re suppose to, this will literally just be a system out print verifying to me that the methods work. I’ve deviated from the originally plan just a little by adding an additional field in the node class called prev, which stores reference to the previous node. This makes it easier to implement removeLast() method in constant time. I am hoping this small change won’t change too much (I am assuming this is an additional 8 bytes in memory for another Node instance which brings me to 48n memory storage which is in line with the 48n +192 requirement — not totally sure with this though, it’s late, I will double check this tomorrow because my brain is mush right now haha). I will implement the randomised queue/stack structure tomorrow!

--

--