Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
s = 'AACTGAACG';
n = 3;
hifreq_correct = 'AAC';
assert(isequal(nGramFrequency(s,n),hifreq_correct))
[Warning: Last element of input column does not match first element of input row.
Column wins anti-diagonal conflict.]
|
2 | Pass |
%%
s = 'dynamic routing service';
n = 2;
hifreq_correct = 'ic';
assert(isequal(nGramFrequency(s,n),hifreq_correct))
[Warning: Last element of input column does not match first element of input row.
Column wins anti-diagonal conflict.]
|
3 | Pass |
%%
s = 'Your veracity is exceeded by your sagacity.';
n = 5;
hifreq_correct = 'acity';
assert(isequal(nGramFrequency(s,n),hifreq_correct))
[Warning: Last element of input column does not match first element of input row.
Column wins anti-diagonal conflict.]
|
4 | Pass |
%%
s = 'AGCGAAGGAAGGATCACATTTCTCAGGACAAAGGCATTTCACTAATGGTT';
n = 3;
hifreq_correct = 'AGG';
assert(isequal(nGramFrequency(s,n),hifreq_correct))
[Warning: Last element of input column does not match first element of input row.
Column wins anti-diagonal conflict.]
|
5 | Pass |
%%
s = 'In short, in matters vegetable, animal, and mineral, I am the very model of a modern Major-General.';
n = 2;
hifreq_correct = 'er';
assert(isequal(nGramFrequency(s,n),hifreq_correct))
[Warning: Last element of input column does not match first element of input row.
Column wins anti-diagonal conflict.]
|
Project Euler: Problem 6, Natural numbers, squares and sums.
782 Solvers
Back to basics 17 - white space
209 Solvers
299 Solvers
Switch matrix to a column vector
189 Solvers
296 Solvers