3 karma · joined Feb 23, 2023 (3y ago) · 4 submissions
comment 2y ago · link · parent
graph data structure is parent of tree, code execution/ function call stacks work like a tree, think flame graphs.
stacks and pointers are baked in assembly and cpu architecture. your claims can't be farther from the truth.
comment 3y ago · link · parent
levels(n, 10) is approximately num_digits(n).
knowing that levels(10, 2) is approximately 3.32, I know that to represent 1000 (3 digits) needs 3 *3.32 approximately 10 bits. 1 million (6 digits) needs 20 bits. 1 billion needs 30 digits. bits are just binary digits.
comment 3y ago · link · parent