Set and Dictionary

This lesson shows how to quickly access data without looping a list.

We'll cover the following...

Storing information in a dictionary or a set is a great way to improve your performance when accessing data. In terms of “Big O” notation, dictionaries and sets are best at O(1) meaning that the cost is constant regardless of how many items are stored.

Big O is a standard way to communicate the complexity of an algorithm. O(1) is the most efficient because it is constant regardless of how many elements you are manipulating.

TypeScript has a couple of ways in which you can ...