Tap here to switch tabs
Problem
Submissions

Problem: Palindromic Subarray Sum

Try to solve the Palindromic Subarray Sum problem.

Statement

Given an array of positive integers nums, find the maximum possible sum of a contiguous subarray that forms a palindrome.

An array is considered a palindrome if it reads the same forwards and backwards.

Return the maximum sum among all palindromic contiguous subarrays.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Palindromic Subarray Sum

Try to solve the Palindromic Subarray Sum problem.

Statement

Given an array of positive integers nums, find the maximum possible sum of a contiguous subarray that forms a palindrome.

An array is considered a palindrome if it reads the same forwards and backwards.

Return the maximum sum among all palindromic contiguous subarrays.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤109\leq 10^9