Bubble Sort algorithm using an array