From 5348b9953da9c9a5c3048c2706870d324b2333d6 Mon Sep 17 00:00:00 2001 From: ibrahim Al-Aqua Date: Tue, 5 Aug 2025 13:35:15 +0200 Subject: [PATCH 1/2] Add solution for problem 1672: richest customer wealth --- .../1672.richest-customer-wealth.jl | 9 ++++++--- test/problems/1672.richest-customer-wealth.jl | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) rename src/{unresolved => problems}/1672.richest-customer-wealth.jl (91%) create mode 100644 test/problems/1672.richest-customer-wealth.jl 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 From 98af9fd09d9c70d15efa9daf4b5595f84f70bf37 Mon Sep 17 00:00:00 2001 From: ibrahim Al-Aqua Date: Tue, 5 Aug 2025 13:46:08 +0200 Subject: [PATCH 2/2] Fix GitHub Actions: Update actions/cache from v1 to v4 - Update actions/cache@v1 to actions/cache@v4 in UnitTest.yml - Update actions/cache@v1 to actions/cache@v4 in documentation.yml - Fixes deprecation warning that was causing CI failures --- .github/workflows/UnitTest.yml | 2 +- .github/workflows/documentation.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: