Pergunta de entrevista da empresa Revolut

Give me examples of concurrency problems. Give me one example of algorithm to store data in a database. What's the difference between sharding and replication?