Media Summary: Utilizing a stack, I show you how to solve this In this video I will show you my solution to one of the problems from the web page The code: def dirReduc(arr) str = arr.join ' ' while str.gsub! /NORTH\s+SOUTH SOUTH\s+NORTH/, "" or str.gsub!
Python Directions Reduction Codewars 5kyu - Detailed Analysis & Overview
Utilizing a stack, I show you how to solve this In this video I will show you my solution to one of the problems from the web page The code: def dirReduc(arr) str = arr.join ' ' while str.gsub! /NORTH\s+SOUTH SOUTH\s+NORTH/, "" or str.gsub!