All Questions
2 questions
6
votes
4
answers
2k
views
Kadane's Algorithm for 2D array with known boundaries
I asked this question first on StackOverflow but I didn't get an answer and was advised to try here too. So here we go.
I have implemented Kadane's algorithm for a 2D array in Python 2 with known ...
11
votes
1
answer
2k
views
Balanced Random Assignment in Python
It has been a very long time since I've used Python.
What I'm looking for: I would like to create a 6-by-6 random matrix where each component is either 1 or 2, so that there are 18 ones and 18 twos.
...