[英]How can I adjust my code to identify if all values of an array are distinct given the test inputs?
我不確定為什么我的代碼沒有為提供給我的測試數據提供正確的輸出。 編寫一個過程“allDistinct”,它接受一個對象數組並返回 true,前提是它們都是不同的(沒有兩個相同)。 您的過程必須適用於所有類,您可以使用變量類型 T 鍵入它<T> boolean allDistinct(T ...