write a java program for you are given a string representing a sequence of N arrows,each pointing in one of the four cardinal directions:up(^),down(v),left(<),right(>) . write a function solution that,given a string S denoting the direction of the arrows,returns the minimum number of arrows that must be rotated to make them all point in the same direction.
Comments
Leave a comment