結果 : how to solve subarray problems in java