[SOLVED] SOLVED: Bi-derectional bubblesort

15.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (4 votes)

1. Bubble Sort In the bubbleSort.java program (Listing 3.1), the in index always goes from left to right, finding the largest item and carrying it toward out on the right. Modify the bubbleSort() method so that it’s bidirectional. This means the in index will first carry the largest item from left to right as before, but when it reaches out, it will reverse and carry the smallest item from right to left. You’ll need two outer indexes, one on the right (the old out) and another on the lef

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.