Adding complexity by generalising: how far should you go?
- by marcog
Reference question: http://stackoverflow.com/questions/4303813/help-with-interview-question
The above question asked to solve a problem for an NxN matrix. While there was an easy solution, I gave a more general solution to solve the more general problem for an NxM matrix. A handful of people commented that this generalisation was bad because it…