Tuesday 2025-11-11
Nov. 11th, 2025 01:41 pmNPRG062 (Introduction to algorithms) [lecture] - the (binary) heap! how to implement it using a list, indexing it from 1 is better because then the index of the parent node is n/2 rounded down and the index of its children is 2n and 2n+1, heap sort as example of a sort that has O(nlog(n)) and is in-place, dictionary and how to deal with a collision caused by the hashing function not being injective
NPRG030 (Programming 1) [lecture] - defined a class that uses a linked list to create a double sided queue and shows how to use assert, then some oop theory, which i know.. python has duck typing, meaning that "if it walks like a duck and it quacks like a duck, then it must be a duck", the teacher gave an example from his life where he got on a filming van during the filming of the movie amadeus and he did what he was told to, so he has a small role in the movie, despite not being cast in it
koku daily message:
stirling approximation