Given a non-empty array of integers, return true if there is an index on which to split the array so that the sum of the numbers on one side is equal to the sum of the numbers on the other side.
I recently participated in a small-team hackathon using Ruby on Rails. After the first day of building, the teams met to discuss some of the pain points we had experienced. One point that came up multiple times was shifting association names. The problem was that team members were implementing associations with…
The task at hand: shuffle an array without using any library methods to shuffle for us. We need an algorithm to change the order of our array in a way that any permutation is equally likely. So, how do we implement an efficient shuffling algorithm?