Solve Zigzag Array

Determine the minimum number of elements to delete from a sequence so its elements alternate between increasing and decreasing. Solving code challenges on HackerRank is one of the best ways to prepare for programming interviews.