Cody

Solution 253433

Submitted on 3 Jun 2013
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
%% dict_cell={'abcd' 'cat' 'dot'}; Achar=['abcd' '``a`' 'dot`']; valid=check_crisscross(Achar,dict_cell); assert(valid==1)
Error: Undefined function or variable "val".
2   Fail
%% dict_cell={'abcd' 'cat' 'dot' 'bcd'}; Achar=['abcd' '``a`' 'dot`']; % Need a unique bcd word valid=check_crisscross(Achar,dict_cell); assert(valid==0)
Error: Undefined function or variable "val".
3   Fail
%% dict_cell={'abcd' 'cat' 'dot' 'acd'}; Achar=['abcd' 'c`a`' 'dot`']; % valid matrix valid=check_crisscross(Achar,dict_cell); assert(valid==1)
Error: Undefined function or variable "val".
4   Fail
%% dict_cell={'avalanche' 'bluejackets' 'blackhawks' 'blues' 'bruins' 'canadiens' 'canucks' 'capitals' 'coyotes' 'devils' 'ducks' 'flames' 'flyers' 'hurricanes' 'islanders' 'jets' 'kings' 'lightning' 'mapleleafs' 'oilers' 'panthers' 'penguins' 'predators' 'rangers' 'redwings' 'sabres' 'senators' 'sharks' 'stars' 'wild'}; Achar=['```````hurricanes``s' 'rangers`````o````m`e' 'e`````t```flyers`a`n' 'd`````a`````o````p`a' 'w`````r`capitals`l`t' 'i`ducks`````e````e`o' 'n```a``sabres````l`r' 'g`kings``l````oilers' 's```u``bruins````a``' '````c````e`````p`f``' 'blackhawks``sharks``' '``v`s``````````e````' '``a````````i```d``p`' '`bluejackets```a``e`' '``a````````lightning' 'canadiens``a```o``g`' '``c``````panthers`u`' '``h`w``````d```s``i`' '`devils```jets````n`' '````l``````r``````s`' '````d`flames````````']; valid=check_crisscross(Achar,dict_cell); assert(valid==1)
Error: Undefined function or variable "val".
5   Fail
%% dict_cell={'avalanche' 'bluejackets' 'blackhawks' 'blues' 'bruins' 'canadiens' 'canucks' 'capitals' 'coyotes' 'devils' 'ducks' 'flames' 'flyers' 'hurricanes' 'islanders' 'jets' 'kings' 'lightning' 'mapleleafs' 'oilers' 'panthers' 'penguins' 'predators' 'rangers' 'redwings' 'sabres' 'senators' 'sharks' 'stars' 'wild'}; Achar=['```````hurricanes``s' 'rangers`````o````m`e' 'e`````t```flyers`a`n' 'd`````a`````o````p`a' 'w`````r`capitals`l`t' 'i`ducks`````e````e`o' 'n```a``sabres````l`r' 'g`kings``l````oilers' 's```u``bruins````a``' '````c````e`````p`f``' 'blackhawks``sharks``' '``v`s``````````e````' '``a````````i```d``p`' '`bluejackets```a``e`' '``a````````lightning' 'canadiens``a```o``g`' '``c``````panthers`u`' '``h`w``````d```s``i`' '`devils```jets````n`' '````l``````r```jets`' '````d`flames````````']; % jets is duplicated valid=check_crisscross(Achar,dict_cell); assert(valid==0)
Error: Undefined function or variable "val".
6   Fail
%% dict_cell={'avalanche' 'bluejackets' 'blackhawks' 'blues' 'bruins' 'canadiens' 'canucks' 'capitals' 'coyotes' 'devils' 'ducks' 'flames' 'flyers' 'hurricanes' 'islanders' 'jets' 'kings' 'lightning' 'mapleleafs' 'oilers' 'panthers' 'penguins' 'predators' 'rangers' 'redwings' 'sabres' 'senators' 'sharks' 'stars' 'wild'}; Achar=['```````hurricanes``s' 'rangers`````o````m`e' 'e`````t```flyers`a`n' 'd`````a`````o````p`a' 'w`````r`capitals`l`t' 'i`ducks`````e````e`o' 'n```a``sabres````l`r' 'g`kings``l````oilers' 's```u``bruins````a``' '````c````e`````p`f``' 'blackhawks``sharks``' '``v`s``````````e````' '``a````````i```d``p`' '`bluejackets```a``e`' '``a````````lightning' 'canadiens``a```o``g`' '``c``````panthers`u`' '``h`w``````d```s``i`' '`devils````e``````n`' '````l``````r``````s`' '````d`flames``jets``']; % Non-Connected jets valid=check_crisscross(Achar,dict_cell); assert(valid==0)
Error: Undefined function or variable "val".
7   Fail
%% dict_cell={'avalanche' 'bluejackets' 'blackhawks' 'blues' 'bruins' 'canadiens' 'canucks' 'capitals' 'coyotes' 'devils' 'ducks' 'flames' 'flyers' 'hurricanes' 'islanders' 'jets' 'kings' 'lightning' 'mapleleafs' 'oilers' 'panthers' 'penguins' 'predators' 'rangers' 'redwings' 'sabres' 'senators' 'sharks' 'stars' 'wild'}; Achar=['```````hurricanes``s' 'rangers`````o````m`e' 'e`````t```flyers`a`n' 'd`````a`````o````p`a' 'w`````r`capitals`l`t' 'i`ducks`````e````e`o' 'n```a``sabres````l`r' 'g`kings``l````oilers' 's```u``bruins````a``' '````c````e`````p`f``' 'blackhawks``sharks``' '``v`s``````````e````' '``a````````i```d````' '`bluejackets```a````' '``a````````lightning' 'canadiens``a```o````' '``c``````panthers```' '``h`w``````d```s````' '`devils```jets``````' '````l``````r````````' '````d`flames````````']; % Missing penguins valid=check_crisscross(Achar,dict_cell); assert(valid==0)
Error: Undefined function or variable "val".
8   Fail
%% dict_cell={'avalanche' 'bluejackets' 'blackhawks' 'blues' 'bruins' 'canadiens' 'canucks' 'capitals' 'coyotes' 'devils' 'ducks' 'flames' 'flyers' 'hurricanes' 'islanders' 'jets' 'kings' 'lightning' 'mapleleafs' 'oilers' 'panthers' 'penguins' 'predators' 'rangers' 'redwings' 'sabres' 'senators' 'sharks' 'stars' 'wild'}; Achar=['```````hurricanes``s' 'rangers`````o````m`e' 'e```jets``flyers`a`n' 'd`````a`````o````p`a' 'w`````r`capitals`l`t' 'i`ducks`````e````e`o' 'n```a``sabres````l`r' 'g`kings``l````oilers' 's```u``bruins````a``' '````c````e`````p`f``' 'blackhawks``sharks``' '``v`s``````````e````' '``a````````i```d``p`' '`bluejackets```a``e`' '``a````````lightning' 'canadiens``a```o``g`' '``c``````panthers`u`' '``h`w``````d```s``i`' '`devils````e``````n`' '````l``````r``````s`' '````d`flames````````']; % invalid jets on row 3 valid=check_crisscross(Achar,dict_cell); assert(valid==0)
Error: Undefined function or variable "val".