Leetcode 2955. Number of Same-End Substrings
Posted on Fri 22 November 2024 in Leetcode Premium • Tagged with math, binary-search, prefix-sum
Question Link : https://leetcode.com/problems/number-of-same-end-substrings/
Difficulty: Medium
Premium: True
Question
You are given a 0-indexed string s, and a 2D array of integers queries, where queries[i] = [li, ri] indicates a substring of s starting from the index li and ending at the index ri (both inclusive), i …
Continue reading