hackerrank collections.deque() problem solution in python programming

join shbcf.ru