Classify a Digit Array by Consecutive Order

Asked at Palo Alto Networks · Coding & Leetcode-style Questions · Difficulty: Easy

Given an integer array `arr`, where every element is a digit from `1` to `9`, classify the array into one of the following categories:

Loading the problem…