Question: Java In user content generated web-services - let's say YouTube - the process of de- duplication is of serious importance. One straight forward reason is
Java 

In user content generated web-services - let's say YouTube - the process of de- duplication is of serious importance. One straight forward reason is same video by different names is just an extra cost in data-storage. So, getting rid of exact duplicate content makes financial sense. Please be reminded that exact same content with different video qualities may not be candidates for removal via de-duplication. In today's Lab we will explore on ways to do a de-duplication of videos where video filenames are presented as integers. For the purposes of our task, we will set a very narrow criterion for deduplication: just the filenames. Below is how the filenames are represented ARRAY []=[50,11,33,21,40,50,40,40,21] Below is the expected output after de-duplication ARRAY [] =[11,21,33,40,50] ATTN: Notice the reduced size of the output array. Also, take a look again at the input array and be reminded that the input array is not sorted! Further, please be reminded that you cannot use library functions to either sort and or perform the de-duplication operation. Doing so would straight up result in a score of Zero! You will solve the problem as: [100 points] Implement the function in such a way that your solution solves the problem with O(nlog2(n)) time complexity overall but stays within the bounds of O(1) space complexity. Here, n is the length of the list of in- put integers (array). I believe the sorting routine that should be used here is Quick Sort. Please state as code comment which sorting routine you are using, sort the array with that algorithm and solve the deduplication problem thereafter. De-duplication part of the solution in itself must adhere to O(n) time bound. However, at this stage of the course we will not be considering any memory used by recursion. Very Very Important: 1. (1) Your code should be well commented which explains all the steps you are performing to solve the problem. A submission without code comments will immediately be deducted 15 points! 2. (2) As a comment in your code, please write your test-cases on how you would test your solution assumptions and hence your code. A submission without test cases will immediately be deducted 15 points! Example of cases to be tested for are like: What if the array input which is expected does not exist that is, input is a null. How should your code handle such a situation? Maybe output some
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
