Two points:
Rearranging equations reveals the solution. becomes , telling you what to search for.
Hash maps convert searches into lookups. This pattern appears in many problems where you need to find pairs or complements.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
summary
Two points:
Rearranging equations reveals the solution. becomes , telling you what to search for.
Hash maps convert searches into lookups. This pattern appears in many problems where you need to find pairs or complements.