-
2 Comments
Marco Castelli
on 22 May 2014
Probably I don't understand what problem ask, but...I think test suite is wrong. For example: test suite 2.
cards = 'A23QJK';
mathSymbols = {'+-/++'};
1+2=3-3=0/9=0+8=8+10=18 that is not 21!
I found {'+-+-+','+/*--','-+-++','-*/++'}=21.
I've problem even in test 5
Alfonso Nieto-Castanon
on 22 May 2014
'A' can take the value 1 or 11 (e.g. 'AAA' with symbols '+-' means 11+11-1==21). 'JQK' all count as 10 (e.g. 'A23QJK' with symbols '+-/++' means ((11+2)-3)/10+10+10==21)
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!