Could someone help with writing an efficient java function for the below please?
Without using internal sorting or deduplication function, take an array which contains duplicate entries and return a new array without duplicates. eg
deduplicate(array(2,5,10,1, “john" “andy", 5, “peter”, “andy”))
// returns 2,5,10,1,“john”, “andy”, “peter”