How exactly do lookup tables work and how to implement them?

I made a program recently that dealt with a lot of if/else statements to return particular values. Someone recommended using lookup tables instead. My question is,

  1. How do they work and how do you implement them?
  2. What is the difference between a map, hash table, and lookup table.

Leave a Comment