HTMLify

LeetCode - Richest Customer Wealth - Go
Views: 14 | Author: abh
func maximumWealth(accounts [][]int) int {
    var max_wealth int
    for _, customer := range accounts {
        var wealth int
        for _, bank := range customer {
            wealth += bank
        }
        if wealth > max_wealth {
            max_wealth = wealth
        }
    }
    return max_wealth
}

Comments