20241122 ◎

Retry: Radix Sort

def radix_sort(arr: list[int]) -> list[int]:
    max_element: int = max(arr)

    i: int = 1
    while i <= max_element:
        bucket = []
        for j in range(10):  # decimal
            bucket.append([])

        for e in arr:
            bucket[e // i % 10].append(e)

        arr: list[int] = []
        for j in range(10):
            arr.extend(bucket[j])

        i *= 10

    return arr


arr: list[int] = [123, 45, 67, 890, 10000, 20, 30, 44, 1, 55]
print(arr)
print(radix_sort(arr))

I think I now understand how Radix Sort works, and I should be able to replicate it for a while.

Read Room Color and Agression in A Criminal Detention Holding Cell: A Test of the “Tranquilizing Pink” Hypothesis by Robert J. Pellegrini (and others)

It is known that the color pink may calm humans. Still, the paper suggests that the effect is very limited or may not exist, as the methodologies of other research are doubtful (to some extent). The result reported in the paper does not indicate any effects of the tranquilizing pink.


Kombucha 200 Lunchable 700 Tofu 100 Yakitori 1000 Yogurt 1000

Total 3000 kcal


MUST:

TODO:


index 20241121 20241123