DiffUtilcalculateDiff
DiffUtil is a utility class in Android development that helps to efficiently update a RecyclerView by calculating the differences between two lists. The calculateDiff method is the core of this utility. It takes the old list and the new list as input and returns a DiffResult object. This DiffResult contains information about the changes between the two lists, such as items that were inserted, removed, or changed.
To use DiffUtil.calculateDiff, you typically create a custom DiffUtil.Callback implementation. This callback requires you to implement
Once the DiffUtil.Callback is implemented, you pass it along with the old and new lists to DiffUtil.calculateDiff.