diff --git a/.github/workflows/UnitTest.yml b/.github/workflows/UnitTest.yml index 4753f04e7..2f79db53b 100644 --- a/.github/workflows/UnitTest.yml +++ b/.github/workflows/UnitTest.yml @@ -25,7 +25,7 @@ jobs: version: ${{ matrix.julia-version }} - name: Cache artifacts - uses: actions/cache@v1 + uses: actions/cache@v4 env: cache-name: cache-artifacts with: diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 8d4f6b06b..b022bb34f 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -23,7 +23,7 @@ jobs: with: version: ${{ matrix.julia-version }} - name: Cache artifacts - uses: actions/cache@v1 + uses: actions/cache@v4 env: cache-name: cache-artifacts with: diff --git a/src/unresolved/1672.richest-customer-wealth.jl b/src/problems/1672.richest-customer-wealth.jl similarity index 91% rename from src/unresolved/1672.richest-customer-wealth.jl rename to src/problems/1672.richest-customer-wealth.jl index 61c3f91e7..baeaba0b4 100644 --- a/src/unresolved/1672.richest-customer-wealth.jl +++ b/src/problems/1672.richest-customer-wealth.jl @@ -1,8 +1,8 @@ # --- # title: 1672. Richest Customer Wealth # id: problem1672 -# author: Tian Jun -# date: 2020-10-31 +# author: Ibrahim Al-Aqua +# date: 2025-08-05 # difficulty: Easy # categories: Array # link: @@ -65,5 +65,8 @@ ## @lc code=start using LeetCode -## add your code here: +function maximumWealth(accounts::Array{<:Integer,2})::Int + return maximum(sum(accounts; dims=2)) +end + ## @lc code=end diff --git a/test/problems/1672.richest-customer-wealth.jl b/test/problems/1672.richest-customer-wealth.jl new file mode 100644 index 000000000..56c478fb5 --- /dev/null +++ b/test/problems/1672.richest-customer-wealth.jl @@ -0,0 +1,5 @@ +@testset "1672.richest-customer-wealth.jl" begin + @test maximumWealth([1 2 3; 3 2 1]) == 6 + @test maximumWealth([1 5; 7 3; 3 5]) == 10 + @test maximumWealth([2 8 7; 7 1 3; 1 9 5]) == 17 +end