Tap here to switch tabs
Problem
Submissions

Problem: Palindromic Subarray Sum

Palindromic Subarray Sum asks you to return the greatest sum of any contiguous subarray in a positive-integer array that reads the same forwards and backwards.

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

Palindromic Subarray Sum asks you to return the greatest sum of any contiguous subarray in a positive-integer array that reads the same forwards and backwards.

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