Postgresql Split Array Leetcode Questions Java