Shopee Interview Question

Q: What is the difference between optimistic and pessimistic locks?