leetcode python machine learning