tofferi.fi - Algorithms and Datastructures

Opetusmateriaali by Jere Tofferi is licensed under CC BY-SA 4.0

Session 5

Topics:

Before session:

Check out session 4

Session materials

Idea of exercises is that you try to improvise functions to different time complexities and test those. Below is template, where you can write functions and test.

Please write up what results (execution time) you get for different functions with different lengths of an array (e.g. n = 1_000, 1_000_000).

(Note that you can terminate process with Ctrl + c, if it takes too long to complete.)

(Note also, that you can use literal 1_000_000 instead of 1000000 if you have net7.0 or newer)

Session exercise template

Feedback form

After session:

Read more about big O and course material

Do course exercises