We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Greedy
- Cloudy Day
- Discussions
Cloudy Day
Cloudy Day
Sort by
recency
|
53 Discussions
|
Please Login in order to post a comment
For something different, here's a parallelizable solution in Java 22, using a Skip List. In theory 𝚯(1) runtime given N processors. (In practice the overhead likely subsumes any gains.)
Python:
def maximumPeople(p, x, y, r): # Return the maximum number of people that will be in a sunny town after removing exactly one cloud.