What is the difference between rank and dense_rank functions

Rank function:

The Rank function is used to grade data depending on certain criteria.

ROO NO NAME PHYSICS CHEMISTRY MATHS
1 ANIL 67 89 76
2 SUNIL 89 65 99
3 AJAY 77 95 94
4 SUSHIL 75 92 91

Example: Displaying ranks based on Total Marks.

select name, total, rank() over (order by total desc) from (select name, (maths+chemistry+physics) total from pcm);

OUTPUT:

name total RANK() OVER (ORDER BY TOTAL DESC)
AJAY 266 1
SUSHIL 258 2
SUNIL 253 3
ANIL 232 4

The DENSE_RANK FUNCTION: The main difference between RANK() function and the DENSE_RANK() function is that in the DENSE_RANK function, there is no gap between the ranks,