Laser 2 - Sorting

rgbCTF 2020
Miscellaneous
hmmm
July 15th, 2020
Esolang


Here's a harder Laser challenge. Given an input stack of numbers, sort them in descending order.

Download file: laser_2.zip

Laser 2 - Sorting

Source: Quintec/LaserLang

Really awful implementation of insertion sort.

Psuedocode:

sorted = []
array = input
while len(array)>0:
    m = min(array)
    output = []
    for el in array:
        if el == m:
            sorted.append(el)
        else:
            output.append(el)
    array = output
print(sorted)

Flag: rgbCTF{1_f33l_y0ur_p41n_trust_m3}