How to resolve the algorithm Last letter-first letter step by step in the Ursala programming language
How to resolve the algorithm Last letter-first letter step by step in the Ursala programming language
Table of Contents
Problem Statement
A certain children's game involves starting with a word in a particular category. Each participant in turn says a word, but that word must begin with the final letter of the previous word. Once a word has been given, it cannot be repeated. If an opponent cannot give a word in the category, they fall out of the game.
For example, with "animals" as the category,
Take the following selection of 70 English Pokemon names (extracted from Wikipedia's list of Pokemon) and generate the/a sequence with the highest possible number of Pokemon names where the subsequent name starts with the final letter of the preceding name. No Pokemon name is to be repeated.
Extra brownie points for dealing with the full list of 646 names.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Last letter-first letter step by step in the Ursala programming language
Source code in the ursala programming language
#import std
mon =
~&*~ sep` mat` -[
audino bagon baltoy banette bidoof braviary bronzor carracosta charmeleon
cresselia croagunk darmanitan deino emboar emolga exeggcute gabite
girafarig gulpin haxorus heatmor heatran ivysaur jellicent jumpluff kangaskhan
kricketune landorus ledyba loudred lumineon lunatone machamp magnezone mamoswine
nosepass petilil pidgeotto pikachu pinsir poliwrath poochyena porygon2
porygonz registeel relicanth remoraid rufflet sableye scolipede scrafty seaking
sealeo silcoon simisear snivy snorlax spoink starly tirtouga trapinch treecko
tyrogue vigoroth vulpix wailord wartortle whismur wingull yamask]-
poke = @iiDrzhK16rlXOASK24PiX ~&llrHiFPrYX^=rxS^|\~&iNCS *=+ ~&rlwNrlCQ^*D/~&+ @h
#show+
example = ~&h poke mon
You may also check:How to resolve the algorithm Echo server step by step in the Oz programming language
You may also check:How to resolve the algorithm Gauss-Jordan matrix inversion step by step in the Nim programming language
You may also check:How to resolve the algorithm Shell one-liner step by step in the Haskell programming language
You may also check:How to resolve the algorithm Playfair cipher step by step in the Java programming language
You may also check:How to resolve the algorithm Sieve of Eratosthenes step by step in the Standard ML programming language