← Goldman Sachs questions
CodingMediumReported in a candidate post, Jul 2025

Count total anagram substrings

Filed under Goldman Sachs · Also reported at Payoda

Given a string s, count the number of pairs of substrings of s that are anagrams of each other (same letters, same counts, different positions). This is the usual reading of 'count total anagram…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Goldman Sachs questions

Collected from public candidate posts and coding forums. Updated Nov 2026.