Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
krackers
on Dec 14, 2022
|
parent
|
context
|
favorite
| on:
A neat XOR trick
Kadane's algorithm (whose name sounds cooler than what it does) doesn't do any masks, it basically just keeps extending the window until the sum becomes negative at which point it starts a new window.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: