![]() One solution I don't see here so far is one based on the use of a Bloom filter, which essentially is an array of bits, so perhaps that passes your requirements. Okay, so you cannot use Set or other collections. ("Is test passed ok?: " + (Arrays.equals(arrayWithoutDuplicates, expectedResult) ? "YES" : "NO")) Īnd the output: Array without duplicates is supposed to be: Īrray without duplicates currently is: ("Array without duplicates currently is: " + Arrays.toString(arrayWithoutDuplicates)) ("Array without duplicates is supposed to be: " + Arrays.toString(expectedResult)) ![]() Integer arrayWithoutDuplicates = ArrayDuplicatesRemover.removeDuplicates(array, Integer.class) Boolean isSame = new boolean įor( int j = i+1 j < input.length j++)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |