Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 173254

Submitted on 5 Dec 2012 by James

Correct

20000Size
Leading solution size is 5625.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
feval(@assignin,'caller','score',0);

                    
2
Pass
 
%%
% Warm-Up Calls
c=randi(4,1000,16,'uint8')-1;
out = unique_rows_fast(c);
out = unique_rows_fast(c);
out = unique_rows_fast(c);

                    
3
Pass
 
%%
c=randi(4,6000000,16,'uint8')-1;
ta=clock;
out = unique_rows_fast(c);
t1=etime(clock,ta)*1000;
assert(isequal(unique(c,'rows'),out))
t2=min(20000,t1); % unique scores 20000 msec
feval(@assignin,'caller','score',floor(t2));