Running Time: O(N)
Space Complexity: O(N) or O(1)
The description reads:"Given an array of integers, find the subset of non-adjacent elements with the maximum sum. Calculate the sum of that subset.
For example, given an array [-2, 1, 3, -4,5] we have the following possible subsets:
Subset Sum
[-2, 3, 5] 6
[-2, 3] 1
[-2, -4] -6
[-2, 5] 3
[1, -4] -3
[1, 5] 6
[3, 5] 8
Our maximum subset sum is 8"
FOLLOW ME:
Slack Channel: https://join.slack.com/t/xavierelonle...
Github: https://github.com/xavierelon1
Facebook: / xavier.hollingsworth.3
Instagram: / xavierelon
LinkedIn: / xavier-hollingsworth-524144127
Twitter: / elon_xavier
Nesta página do site você pode assistir ao vídeo on-line HackerRank | Max Array Sum | Solution Explained (Java + Whiteboard ) duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Xavier Elon 28 Julho 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 5,362 vezes e gostou 67 espectadores. Boa visualização!