JavaScript (Node.js), (削除) 80 (削除ここまで) 73 bytes
f=([x,...y])=>x?f(y).map(z=>x+z).concat(x=='v'?f(y).map(z=>'^'+z):[]):[y]
ngn
- 15.6k
- 2
- 45
- 90
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchangef=([x,...y])=>x?f(y).map(z=>x+z).concat(x=='v'?f(y).map(z=>'^'+z):[]):[y]