Remove duplicates from integer array

前端 未结 23 2436
执念已碎
执念已碎 2020-12-01 18:52

I having a problem with coding this:

Write a static method named removeDuplicates that takes as input an array of integers and returns as a result a new

23条回答
  •  孤街浪徒
    2020-12-01 19:26

    You could also put the array elements into a Set for which the semantics precisely are that it contains no duplicate elements.

提交回复
热议问题