improvement of UniquePathsII because of python array accesing of negative index