<h3 class='likesectionHead' id='the-weekly-challenge-prolog-solutions'><a id='x1-1000'></a>The Weekly Challenge 312 (Prolog Solutions)</h3>

The examples used here are from the weekly challenge problem statement and demonstrate the working solution. Part 1: Minimum Time You are given a typewriter with lowercase english letters a to z arranged in a circle. Typing a character takes 1 sec. You can move pointer one character clockwise or anti-clockwise. The pointer initially points at a. Write a script to return minimum time it takes to…