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 192284

Submitted on 17 Jan 2013 by Aurelien Queffurust

Correct

76Size
Leading solution size is 26.
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
 
%%
x = ['TIPE'
     'YECV'
     'LSRA'
     'WOTU'];
y = 'RACIEST';
assert(isequal(boggle_checker(x,y),true))
rs =
ACEEILOPRSTTUVWY
ll =
     1     1     0     1     1     0     0     0     1     1     0     1     0     0     0     0
ans =
     1
2
Pass
 
%%
x = ['TIPE'
     'YECV'
     'LSRA'
     'WOTU'];
y = 'RACIESTS';
assert(isequal(boggle_checker(x,y),false))
rs =
ACEEILOPRSTTUVWY
ll =
     1     1     0     1     1     0     0     0     1     2     0     1     0     0     0     0
ans =
     0
3
Pass
 
%%
x = ['TIPE'
     'YECV'
     'LSRA'
     'WOTU'];
y = 'RACIESTW';
assert(isequal(boggle_checker(x,y),false))
rs =
ACEEILOPRSTTUVWY
ll =
     1     1     0     1     1     0     0     0     1     1     0     1     0     0     1     0
ans =
     1
ans =
     0
4
Pass
 
%%
x = ['TIPE'
     'YECV'
     'LSRA'
     'WOTU'];
y = 'AUTOLYTIC';
assert(isequal(boggle_checker(x,y),true))
rs =
ACEEILOPRSTTUVWY
ll =
     1     1     0     0     1     1     1     0     0     0     0     2     1     0     0     1
ans =
     1
5
Pass
 
%%
x = ['TIPE'
     'YECV'
     'LSRA'
     'WOTU'];
y = 'RESTAR';
assert(isequal(boggle_checker(x,y),false))
rs =
ACEEILOPRSTTUVWY
ll =
     1     0     0     1     0     0     0     0     2     1     0     1     0     0     0     0
ans =
     0
6
Pass
 
%%
x = ['OCEW'
     'LRIR'
     'GYSI'
     'KREM'];
y = 'SIRI';
assert(isequal(boggle_checker(x,y),true))
rs =
CEEGIIKLMORRRSWY
ll =
     0     0     0     0     0     2     0     0     0     0     0     0     1     1     0     0
ans =
     1
7
Pass
 
%%
x = ['OCEW'
     'LRIR'
     'GYSI'
     'KREM'];
y = 'SIRIM';
assert(isequal(boggle_checker(x,y),true))
rs =
CEEGIIKLMORRRSWY
ll =
     0     0     0     0     0     2     0     0     1     0     0     0     1     1     0     0
ans =
     1