Puzzling Adventures - Episode 0: Prefix Codes
code<metas>
Welcome to my very first real video in what I hoped would be a quick to produce series of very short and self contained videos. Well, anyone who reads my blog or knows me personally might have realized by now that making short things is not exactly my greatest strength. As such, I hope you will enjoy spending a little more than 1 hour with me as I solve and talk about a puzzle on codingame.com in somewhat excessive detail ;-) If you do, please let me know what you liked and didn't like in the comments below and also leave suggestions for other puzzles you would like to see in this series.
Thank you very much for your time!
Timestamps:
0:00 codingame.com Introduction 3:00 Complaints about example code 5:00 Problem statement 10:10 First solution(with unordered_map) 18:55 Why is that not ideal? 23:30 Trie motivation and explanation 38:38 Second solution(with trie) 1:00:32 Benchmarks 1:04:02 Begging
Links: The puzzle covered this time: https://www.codingame.com/training/easy/prefix-code My profile, just in case you wish to challenge me to a Clash of Code sometime: https://www.codingame.com/profile/a41e5f2d496e10e016a00669702741317380214
Blogpost about include ordering: https://codemetas.de/2020/07/15/A-plea-for-order.html
C++ Weekly Episode about std::endl: https://www.youtube.com/watch?v=GMqQOEZYVJQ
Apparently, the name "Trie" was selected by Edward Fredkin(https://en.wikipedia.org/wiki/Edward_Fredkin) from the middle of "retrieve": https://en.wikipedia.org/wiki/Trie#History,_etymology,_and_pronunciation
Quick-Bench: https://quick-bench.com/
268606457 Bytes