Skip to content

Commit dde94d4

Browse files
committed
add case
1 parent 0fdcb70 commit dde94d4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
class Solution {
3+
4+
/**
5+
* @param Integer[] $nums
6+
* @return Integer
7+
*/
8+
function removeDuplicates($nums) {
9+
return count(array_unique($nums));
10+
}
11+
}
12+
13+
$solution = new Solution;
14+
print_r($solution->removeDuplicates(array(0,0,1,1,1,2,2,3,3,4)));
15+
print_r($solution->removeDuplicates(array(1,1,2)));

0 commit comments

Comments
 (0)