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.
- Cube Summation
- Discussions
Cube Summation
Cube Summation
Sort by
recency
|
14 Discussions
|
Please Login in order to post a comment
get ur hands dirty with 3D fenwick tree
very long algo but this doesnt care about the number of queries, the standard approach that scans the queries so far will time out if the number of queries is too large, but this wall of text 3D fenwick tree method wont
Java 8:
Python 3 Just maintains a sparse representation through a dict, and iterates over entries checking they are within the bounds for each QUERY. Seems like this is only one conceptual step above the naive solution. Why is this in week 13? Is it harder in some languages?
Java converts to long for sum. Unncessary to use DP to pass test cases.