Skip to content

Instantly share code, notes, and snippets.

View assyrianic's full-sized avatar
💻
CompEng courses

Kevin Yonan assyrianic

💻
CompEng courses
View GitHub Profile
@assyrianic
assyrianic / int_to_aii_numeral.py
Created August 29, 2023 17:36 — forked from ledzeppelin/int_to_aii_numeral.py
integer to assyrian numeral
def int_to_aii_numeral(num):
# greedy approach similar to https://leetcode.com/problems/integer-to-roman/description/
# time O(1)
# space O(1)
# based on the numerals here: https://en.wiktionary.org/wiki/Module:number_list/data/aii
numerals = [
(1000, 'ܐ݇'),
(900, 'ܨ̈'), (800, 'ܦ̈'), (700, 'ܥ̈'), (600, 'ܣ̈'), (500, 'ܢ̈'), (400, 'ܬ'),
(300, 'ܫ'), (200, 'ܪ'), (100, 'ܩ'), (90, 'ܨ'), (80, 'ܦ'), (70, 'ܥ'), (60, 'ܣ'),