Better HN
topnewbestaskshowjobs
Log inSign up

mizzlr_

3 karma · joined Feb 23, 2023 (3y ago) · 4 submissions

Submissions

comment 2y ago · link · parent

graph is a data structure, not a data type. if you squint enough pointers are the building blocks (the data type is you please) for building graph data structure. a->b is pointer access, looks like an edge in the graph.

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

In computer science, I read log as levels. n log n is n time levels(n, 2). levels is the number of time n can be repeatedly halved until result is less than 2. levels has something to do with recursion of problem into 2 smaller sub problems.

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

LavinMQ is much better.

comment 3y ago · link · parent

To expect a value of 200 means to have the average of 200 from this point in time onwards, assuming stock price is random walk. Not that the value tomorrow will be exactly 200. It could be 200, 201, 199, 202, 198 etc. the average expected is 200. If you possess no external knowledge such as insider information, then random walk is a sensible and obvious choice for stock price.