You are given an array of random integers. How will you remove duplicates without using any additional data structure?
Time complexity calculation : Time to sort the array = \( O(nlogn) \). Time to remove duplicates = \( \theta(n) \). \( \therefore \) Overall Time complexity = \( O(nlogn) \). public int removeDuplicatesW/ODataStructure(int[] array){ |