Bash Split First Occurrence Leetcode 150 Problem