Given the following array data, answer the following questio…

Given the following array data, answer the following questions:int[ ] arr = {8,4,5,7,2,6,9,1}   How many checks (i.e., iterations through the loop) would be needed to return the index of the value 6 (or -1 if it can’t be found) using Linear Search? The Linear Search Algorithm is given, for reference:

Using Bubble Sort, show the state of the array at the end of…

Using Bubble Sort, show the state of the array at the end of each iteration through the outer loop (i.e., after each full time/sweep/traversal through the array using the inner loop) until the algorithm is complete/finished. The Bubble Sort Algorithm is given, for reference: