Amazon interview question

Solid principles and optimistic locking in detail