6 kyu
Make the Deadfish Swim
10,147 of 38,757NullData
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 | 58524 |
Total Skips | 5845 |
Total Code Submissions | 95886 |
Total Times Completed | 38757 |
JavaScript Completions | 10147 |
CoffeeScript Completions | 135 |
C# Completions | 2597 |
Rust Completions | 1819 |
Python Completions | 9822 |
Haskell Completions | 382 |
PHP Completions | 1846 |
C Completions | 1548 |
Go Completions | 2402 |
Ruby Completions | 514 |
Java Completions | 4886 |
Scala Completions | 356 |
Groovy Completions | 121 |
Julia Completions | 110 |
TypeScript Completions | 2626 |
PowerShell Completions | 134 |
COBOL Completions | 12 |
D Completions | 13 |
Factor Completions | 10 |
Dart Completions | 99 |
Nim Completions | 9 |
VB Completions | 7 |
C++ Completions | 333 |
Kotlin Completions | 127 |
Lua Completions | 24 |
Crystal Completions | 3 |
Total Stars | 485 |
% of votes with a positive feedback rating | 91% of 3416 |
Total "Very Satisfied" Votes | 2862 |
Total "Somewhat Satisfied" Votes | 515 |
Total "Not Satisfied" Votes | 39 |