Q1: https://leetcode.com/problems/palindromic-substrings/ (Except only count distinct substrings)
Q2: Given an array of integers, return the pivot index such that the sum of all the integers to the left of the pivot is equal to the sum of all the integers to the right of the pivot. You may assume that such a pivot is guaranteed to exist.