Anonymous user
Move-to-front algorithm: Difference between revisions
m
→{{header|Gambas}}
(Adds Clojure solution) |
|||
Line 793:
=={{header|Gambas}}==
'''[https://gambas-playground.proko.eu/ You can run this code. Copy the code, click this link, paste it in and press 'Run !']'''
<lang gambas>Public Sub Main()
Dim sToCode As String[] = ["broood", "bananaaa", "hiphophiphop"] 'Samples to process
Line 823 ⟶ 824:
Print sHold[siCounter] & " = " & sOutput 'Print the coded and decoded result
sOutput = "" 'Clear sOutput
Next
End</lang>
Output:
<pre>
|