add some java and python solutions