standard n^2 solution for longest subseqence
added avoidRoad DP problem