From a C++ program remove all the comments. The program source is an array where source[i] is the i-th line of source code. The array repres...
Read More
Showing posts with label string. Show all posts
Showing posts with label string. Show all posts
Can make palindrome from substring
We are given a string s, we make queries on it. For each query queries[i] = [left,right,x], the substring from s[left] to s[right] can be r...
Read More
Subscribe to:
Posts (Atom)
Sum of Subarray Minimums
Given an array A of integers, find the sum of min(B), where B ranges over every (contiguous) subarray of A. Since the answer may be large, r...