Till KTH:s startsida Till KTH:s startsida

Ändringar mellan två versioner

Här visas ändringar i "Complexity" mellan 2017-11-08 12:56 av Johan Montelius och 2020-01-14 11:21 av Johan Montelius.

Visa < föregående ändring.

Complexity

Understanding and have a natural feel for runtime complexity is very important when programming. It is very easy to implement a solution without thinking about complexity that will work fine for smaller data sets. As the dataset grows however, the program will take forever to compute. As you learn functional programming we should definitely spend a lecture on complexity.


* complexity.pdf
Before this lecture Before this lecture you should repeat what you've learned about asymptotic time complexity in the course in "Algorithms and Data Structures". The concepts that we will talk about during the lecture should not be new to you. We will only set them in perspective and exemplify with practical examples

You should by now be up and running writing small Elixir programs.¶ Elixir concepts These are the concepts that you should be comfortable to work with:


* Elixir: Basic types - all but not anonymous functions
* Elixir: Pattern matching
* Elixir: Case, cond and if
* Elixir: Char lists
* Elixir: Named functions
* Elixir: Recursion