-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup: leetcode problem 1672, computing richest customer's wealth -@i…
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |