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

The examples used here are from the weekly challenge problem statement and demonstrate the working solution. Part 1: Equal Strings You are given three strings. You are allowed to remove the rightmost character of a string to make all equals. Write a script to return the number of operations to make it equal otherwise -1. The approach we’ll take is to pop off the last letter of each and compare the…