Decades whether the elements in an array are repeated?

xiaoxiao2021-03-06  80

String [] s = new string () {"1", "2", "3", "4", "1"};

SET set = new hashset ();

For (int i = 0; i

{

SET.ADD (S [i]);

}

IF (set.size () == s.length) // no repetition

IF (set.size ()

转载请注明原文地址:https://www.9cbs.com/read-94969.html

New Post(0)