This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
cards = 'A3762';
mathSymbols = {'+-*/'};
assert(isequal(sort(solveBlackjackPuzzle(cards)), sort(mathSymbols)))
|
2 | Pass |
cards = 'A23QJK';
mathSymbols = {'+-/++'};
assert(isequal(sort(solveBlackjackPuzzle(cards)), sort(mathSymbols)))
|
3 | Pass |
cards = '923';
mathSymbols = {'*+', '-*'};
assert(isequal(sort(solveBlackjackPuzzle(cards)), sort(mathSymbols)))
|
4 | Pass |
cards = 'A23456';
mathSymbols = {'**+++', '*+*-+', '*-+*+', '+++++', '+++-+', '-+/*+', '--+++', '/-*++', '/--+*'};
assert(isequal(sort(solveBlackjackPuzzle(cards)), sort(mathSymbols)))
|
5 | Pass |
cards = 'JQKA';
mathSymbols = {'*/+', '+-+', '-++', '/*+'};
assert(isequal(sort(solveBlackjackPuzzle(cards)), sort(mathSymbols)))
|
6 | Pass |
cards = 'KA';
mathSymbols = {'+'};
assert(isequal(sort(solveBlackjackPuzzle(cards)), sort(mathSymbols)))
|
7 | Pass |
cards = 'AAA';
mathSymbols = {'+-','-+'};
assert(isequal(sort(solveBlackjackPuzzle(cards)), sort(mathSymbols)))
|
134 Solvers
201 Solvers
Find a subset that divides the vector into equal halves
332 Solvers
Piecewise linear interpolation
298 Solvers
208 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!