#3

 Hi,

Day 3 is finally done.

Today was a fun session where I didn't even realize how 2 hours passed by.


"Everyday do something that makes you uncomfortable"

- David Goggins


Learning Today

Today started with learning how to implement a link list in python3, then progressed to learning about python3 functions like reversed(), divmod(), zip(), and cycle(). 

As operations on lists and tuples are going to get more detailed, having working understanding of the itertools library will come in handy so looking forward to experiment with it in the coming days.


Key Takeaways : 

1. Reading documentation does not really help if there is not a clear and concise usage in mind

2. Breaking down the problem correctly saves a lot of time

3. I should consider reducing my time to arrive at a solution as today took 2 hr 07 mins

4. I should start looking at implementations early on once I have formulated the algorithm and run through v1 of code

Errors encountered : 

1. UnboundLocalError : variable is referenced before assignment

Why it was encountered ?

While looping overlink list elements, I was trying to add assignment to a variable with same name. Python working under the hood revealed that this is a common error and can be resolved by declaring the variable global or nonlocal at the start within the function definition

Looking forward to tomorrow so I can learn more about link list and build functions to perform operations on linked list

Learning Topics

Main Focus
 - Python, 
 - Linked List, Arrays / List
To Implement
 - HashMap


Attached Images : code for linked list with reversal function+ time taken to write algorithm and run testcases




Comments

Popular posts from this blog

#2