Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Goldmine Problem with question link #3820
Conversation
|
Here is why the pre-commit failed:
Travis failed because your program needed input while Pytest was running. Fix this issue by putting the algorithm in a function. |
|
|
||
| #Question Problem : https://leetcode.com/problems/path-with-maximum-gold/ | ||
|
|
||
| n = int(input().strip()) |
| n = int(input().strip()) | ||
| m = int(input().strip()) | ||
| arr = [[0]*m for _ in range(n)] | ||
| print(arr) |
mrmaxguns
Nov 5, 2020
Contributor
Algorithms should not have any side-effects. Consider creating two functions: one for the algorithm itself, and another that invokes this function and prints output.
| for i in range(n): | ||
| arr[i] = [int(j) for j in input().strip().split(" ")] | ||
|
|
||
| dp = [[0]*m for _ in range(n)] |
mrmaxguns
Nov 5, 2020
Contributor
Do not use abbreviations for variable names. Readability is key when writing code
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}.