Prime Subtraction Operation | Leetcode 2601