Given an n-element unsorted array 𝐴 of 𝑛 integers and an integer x, rearranges the elements in 𝐴 : (a) Given an n-element unsorted array 𝐴 of 𝑛 integers and an integer x, rearranges the elements in 𝐴 such that all elements less than or equal to x come before any elements larger than x. ( Note: Don't have to include integer x in the new array )

(b) What is the running time complexity of your algorithm? Explain your answer.