New answers tagged matrix
1
vote
Accepted
Returning all divisors of a number as a matrix with N X 2 dimensions
PEP8 specifies CapWords for class names. But you should figure out a better class name than DataStructure, since that's not very descriptive.
Your docstring starts out "from any input". ...
0
votes
Accepted
Validator for 0/1 entries in a matrix
You already know the primary problem with your code: repetition.
You have written reasonable code that is not difficult to understand.
The problem is that you have four nearly identical chunks of code....
1
vote
Validator for 0/1 entries in a matrix
Your operation is pretty strange and has lots of edge cases so there's a limited amount that you can do to shorten your code. But you should probably use Numpy to handle matrix operations.
...
3
votes
Accepted
С++: Find max element from section in matrix
Create a class Matrix
Instead of passing around vectors of vectors, consider creating a class Matrix. That makes the code much ...
Top 50 recent answers are included
Related Tags
matrix × 663performance × 175
c++ × 161
python × 159
algorithm × 93
java × 92
c × 67
beginner × 44
numpy × 44
python-3.x × 38
programming-challenge × 38
matlab × 36
c# × 35
r × 34
mathematics × 32
array × 31
interview-questions × 21
object-oriented × 20
javascript × 19
c++11 × 17
recursion × 16
time-limit-exceeded × 16
image × 16
graph × 14
dynamic-programming × 13