6 kyu
Make the Deadfish Swim
10,114 of 38,485NullData
Description:
Create a parser to interpret and execute the Deadfish language.
Deadfish operates on a single value in memory, which is initially set to 0.
It uses four single-character commands:
i
: Increment the valued
: Decrement the values
: Square the valueo
: Output the value to a result array
All other instructions are no-ops and have no effect.
Examples
Program "iiisdoso"
should return numbers [8, 64]
.
Program "iiisdosodddddiso"
should return numbers [8, 64, 3600]
.
Parsing
Algorithms
Similar Kata:
Stats:
Created | Jul 12, 2013 |
Published | Jul 12, 2013 |
Warriors Trained | 58121 |
Total Skips | 5800 |
Total Code Submissions | 95329 |
Total Times Completed | 38485 |
JavaScript Completions | 10114 |
CoffeeScript Completions | 135 |
C# Completions | 2587 |
Rust Completions | 1812 |
Python Completions | 9745 |
Haskell Completions | 381 |
PHP Completions | 1830 |
C Completions | 1537 |
Go Completions | 2391 |
Ruby Completions | 512 |
Java Completions | 4853 |
Scala Completions | 355 |
Groovy Completions | 120 |
Julia Completions | 109 |
TypeScript Completions | 2601 |
PowerShell Completions | 131 |
COBOL Completions | 12 |
D Completions | 13 |
Factor Completions | 10 |
Dart Completions | 85 |
Nim Completions | 9 |
VB Completions | 5 |
C++ Completions | 313 |
Kotlin Completions | 114 |
Lua Completions | 23 |
Crystal Completions | 3 |
Total Stars | 479 |
% of votes with a positive feedback rating | 91% of 3401 |
Total "Very Satisfied" Votes | 2849 |
Total "Somewhat Satisfied" Votes | 513 |
Total "Not Satisfied" Votes | 39 |