Cody

Problem 465. Dick Van Dyck?

Solution 592566

Submitted on 6 Mar 2015 by goc3
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   Pass
%% D='<(DVD)[MTM]>'; D123='<1 (2 DVD 2)[2 MTM 2] 1>' assert(isequal(Dyck(D),D123))

D123 = <1 (2 DVD 2)[2 MTM 2] 1> D = <1 (# DVD &)[# MTM &] &> D = <1 (2 DVD &)[# MTM &] &> D = <1 (2 DVD 2)[# MTM &] &> D = <1 (2 DVD 2)[2 MTM &] &> D = <1 (2 DVD 2)[2 MTM 2] &> D = <1 (2 DVD 2)[2 MTM 2] 1>

2   Pass
%% D='<(<DVD>)[[MTM]]>'; D123='<1 (2 <3 DVD 3> 2)[2 [3 MTM 3] 2] 1>' assert(isequal(Dyck(D),D123))

D123 = <1 (2 <3 DVD 3> 2)[2 [3 MTM 3] 2] 1> D = <1 (# <# DVD &> &)[# [# MTM &] &] &> D = <1 (2 <# DVD &> &)[# [# MTM &] &] &> D = <1 (2 <3 DVD &> &)[# [# MTM &] &] &> D = <1 (2 <3 DVD 3> &)[# [# MTM &] &] &> D = <1 (2 <3 DVD 3> 2)[# [# MTM &] &] &> D = <1 (2 <3 DVD 3> 2)[2 [# MTM &] &] &> D = <1 (2 <3 DVD 3> 2)[2 [3 MTM &] &] &> D = <1 (2 <3 DVD 3> 2)[2 [3 MTM 3] &] &> D = <1 (2 <3 DVD 3> 2)[2 [3 MTM 3] 2] &> D = <1 (2 <3 DVD 3> 2)[2 [3 MTM 3] 2] 1>

3   Pass
%% D='<(<<DVD>>)[[MTM]]>'; D123='<1 (2 <3 <4 DVD 4> 3> 2)[2 [3 MTM 3] 2] 1>' assert(isequal(Dyck(D),D123))

D123 = <1 (2 <3 <4 DVD 4> 3> 2)[2 [3 MTM 3] 2] 1> D = <1 (# <# <# DVD &> &> &)[# [# MTM &] &] &> D = <1 (2 <# <# DVD &> &> &)[# [# MTM &] &] &> D = <1 (2 <3 <# DVD &> &> &)[# [# MTM &] &] &> D = <1 (2 <3 <4 DVD &> &> &)[# [# MTM &] &] &> D = <1 (2 <3 <4 DVD 4> &> &)[# [# MTM &] &] &> D = <1 (2 <3 <4 DVD 4> 3> &)[# [# MTM &] &] &> D = <1 (2 <3 <4 DVD 4> 3> 2)[# [# MTM &] &] &> D = <1 (2 <3 <4 DVD 4> 3> 2)[2 [# MTM &] &] &> D = <1 (2 <3 <4 DVD 4> 3> 2)[2 [3 MTM &] &] &> D = <1 (2 <3 <4 DVD 4> 3> 2)[2 [3 MTM 3] &] &> D = <1 (2 <3 <4 DVD 4> 3> 2)[2 [3 MTM 3] 2] &> D = <1 (2 <3 <4 DVD 4> 3> 2)[2 [3 MTM 3] 2] 1>

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!