How many times does the first for loop in bubble sort execute?

The length of the list minus 1The length of the list

Exactly!

The first for loop in bubble sort executes the length of the list minus 1.