Skip to content

Commit

Permalink
setup: leetcode problem 1672, computing richest customer's wealth -@i…
Browse files Browse the repository at this point in the history
  • Loading branch information
iamserda committed Feb 15, 2025
1 parent 6f54693 commit 1855376
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
9 changes: 9 additions & 0 deletions leetcode/1672/challenge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class Solution:
def maximumWealth(self, accounts: list[list[int]]) -> int:
pass


sol = Solution()
assert sol.maximumWealth([[1, 2, 3], [3, 2, 1]]) == 6
assert sol.maximumWealth([[1, 2, 3], [4, 5, 7], [1, 3, 9]]) == 16
assert sol.maximumWealth([[2, 8, 7], [7, 1, 3], [1, 9, 5]]) == 17
48 changes: 48 additions & 0 deletions leetcode/1672/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 0. [Problem Title](https://example.com/)

## Description

Lorem ipsum dolor sit amet consectetur adipisicing elit. Maxime mollitia,
molestiae quas numquam blanditiis harum quisquam!

Provident similique accusantium nemo autem. Veritatis obcaecati tenetur iure eius earum ut molestias architecto voluptate aliquam nihil.

Reprehenderit, quia. Quo neque error repudiandae fuga? Ipsa laudantium molestias eos sapiente offici is modi at sunt excepturi expedita sint?

## Examples

**Example 1:**

Input: `nums = [2,7,11,15], target = 9`
Output: `[0,1]`
Reasoning: Because `nums[0] + nums[1] == 9`, we return `[0, 1]`.

**Example 2:**

Input: `nums = [3,2,4], target = 6`
Output: `[1,2]`

**Example 3:**

Input: nums = `[3,3], target = 6`
Output: `[0,1]`

## constraints

- `2 <= nums.length <= 104`
- `109 <= nums[i] <= 109`
- `109 <= target <= 109`
- **Only one valid answer exists.**

**Follow-up:**
Lorem ipsum dolor sit amet consectetur adipisicing elit. Maxime mollitia,
molestiae quas numquam blanditiis harum quisquam!

## Credits, Source, Etc

- Source: [LeetCode](https://leetcode.com/problems/merge-sorted-array/description/)
- [github: @iamserda](https://github.com/iamserda)
- [twitter: @iamserda](https://twitter.com/iamserda)
- [linkedin: @iamserda](https://linkedin.com/in/iamserda)

Made with 🤍🫶🏿 in N🗽C by [@iamserda](https://www.twitter.com/iamserda)
9 changes: 9 additions & 0 deletions leetcode/1672/solutions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class Solution:
def maximumWealth(self, accounts: list[list[int]]) -> int:
pass


sol = Solution()
assert sol.maximumWealth([[1, 2, 3], [3, 2, 1]]) == 6
assert sol.maximumWealth([[1, 2, 3], [4, 5, 7], [1, 3, 9]]) == 16
assert sol.maximumWealth([[2, 8, 7], [7, 1, 3], [1, 9, 5]]) == 17

0 comments on commit 1855376

Please sign in to comment.