Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Arkalius
Partial surface area of a sphere?
Lets say I have a sphere with a known radius R. If I take a cone section out of this sphere, such that the tip of the cone would be at the center of the sphere, the base of the cone would be a curved surface. If I know angle of this cone section (the angle at it's point), how can I find the surface area of it's base?
Theoretically this cone can be as big as a half sphere if the angle is 180 degrees.
1 AnswerMathematics1 decade agoBest algorithm to sort and unique a large list of items?
I have a complex sorting situation that I'd like to optimize. I have a working implementation but I think it could be better.
I have a large list (millions) of strings. There can and are likely many redundant entries. I'd like to take this list as input and output a list that is sorted, unique, and with a count of the number of times a particular item appeared in the original list. So for example, if I had a list like:
3 5 2 3 9 1 1 3 3
I'd like to output
(1, 2) (2, 1) (3, 4) (5, 1) (9, 1)
(first number is the item, second number is number of occurances, note it is sorted by the first number). Output format is irrelevant, I just used this format to be concise.
The main problem here is that the original list is too large to fit into memory in many cases, so I cannot sort the list in place. Does anyone have any suggestions for an efficient solution?
1 AnswerProgramming & Design1 decade ago