Algorithm: efficient way to remove duplicate integers from an array

前端 未结 30 2765
离开以前
离开以前 2020-11-22 16:03

I got this problem from an interview with Microsoft.

Given an array of random integers, write an algorithm in C that removes duplicated numbers an

30条回答
  •  忘掉有多难
    2020-11-22 16:16

    import java.util.ArrayList;
    
    
    public class C {
    
        public static void main(String[] args) {
    
            int arr[] = {2,5,5,5,9,11,11,23,34,34,34,45,45};
    
            ArrayList arr1 = new ArrayList();
    
            for(int i=0;i

提交回复
热议问题