0 0 votes Suppose $X=\left(x_{1}, x_{2}, \ldots, x_{n}\right)$ is an array of numbers (not necessarily integers) sorted in the ascending order, and $Y=\left(y_{1}, y_{2}, \ldots, y_{n}\right)$ is the array constructed as $y_{i}=f\left(x_{1}\right)$ for $i=1,2, \ldots, n$, where\[f(x)=(x+1)(x-1)(x-3)\]Describe an algorithm that sorts $Y$ using $O(n)$ comparisons.Provide justification for the correctness and the number of comparisons used by your algorithm. Algorithms isi2025-mcs-pcb sorting algorithms algorithm-design + – Shubham Sharma 2 254 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.