Pinterest interview question

Explain attention mechanism in transformers.