previous solution uses extra O(n) space to put linked list into array which has random access. it is cheating; added python version to it but did not pass OJ