Comment by strangesmells02
2 years ago
just divide by 1000 until x < 1000 and return int(x) plus a map of number of times divided by 1,000 to MB, GB,... string.
Its a O(1) operation because of limited size allowed for numeric types
2 years ago
just divide by 1000 until x < 1000 and return int(x) plus a map of number of times divided by 1,000 to MB, GB,... string.
Its a O(1) operation because of limited size allowed for numeric types
No comments yet
Contribute on Hacker News ↗