# Tutorial - Imperative Programming I and II - 2023-05-04

> Source: https://ollybritton.com/notes/uni/prelims/ht23/ip/tutorials/2023-05-04/ · Updated: 2023-05-04 · Tags: uni, notes

- [Course - Imperative Programming III TT23](https://ollybritton.com/notes/uni/prelims/tt23/ip/imperative-programming-iii/)

- Invariants should be as detailed as possible
- Make sure to check for null in traversal questions
- Check the termintation conditions for each while/for loop
- Exams online; can get given exam solutions from over 3 years ago; and can come and see exam papers from the last three years in Irwin’s office

### Collection
#### Question 2
- For relatively small problem sizes, a binary search tree will be slower because there’s a lot of overhead. E.g. if there’s a hash table with 100 buckets of 10 names each, it’s probabily still better to use a hash table over a binary search tree.

#### IP III, Sheet 1
##### Question 1
- Redundancy, you don’t gain anything from making seperate classes for circles and square

### Question 7
- Add equals stuff to Scala notes

### Flashcards
### Proofs

---
Olly Britton — https://ollybritton.com. Machine-readable index: https://ollybritton.com/llms.txt
