How do you decide which pattern to use (sliding window, two pointers, hash map) when solving array/string problems? And should we always start with brute force before optimizing?