# LC6800 Two Sum **Idea.** Hash map of complement indices. ```python def twoSum(a,t): m={} for i,x in enumerate(a): if t-x in m: return [m[t-x],i] m[x]=i ``` **Interview habit.** Say the brute force, then the optimisation, then edge cases. Rehearse that flow with [Linkjob AI](https://www.linkjob.ai/).