| Enum types
 | 
| Data Structure Types
 Maps < 32 are sorted lists Maps > 32 are hash-tree (HAMT) Lists, when insert prepend for O(1), append is O(n) | |||||||||||||||
| Sort Algoritms
 Avoid:  QuikSort because we can get O(n²) if the list is already sorted. Insertion (O(n²)) → If the list is inverted. | ||||||||||||||||||||||||||||||
| Merge Sort
 | 
| Insertion Sort
 | 
| Detect Anagram
 O(n log n) because Enum.sort | 
| Palindrome
 Use recursive option is less performance. It uses List.last/1 and Enum.drop/2 (O(n) each), making the complexity O(n²). | 
| Fibonacci
 O(n) | 
| Fast Enum Reference
 Liveview callbacks
 Actor model
 GenServer Callback
 | Best for inserts / updates
 Process Communication Elixir/Erlang
 | Strings to charlist
 Imports, alias, use, require
 Difference GenServer VS GenState
 | String to List ("AB"=>["A", "B"])
 Interfaces with Elixir (polymorphism)
 inheritance in Elixir
 OBAN vs EXq
 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||



Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets