
Comparing strings can be quite expensive, in a scenario where we might have many more commands, how can you optimize this further? Try seeing what data structures in C++ can help you increase lookup speeds instead of strstr for each command we might have.