Tap here to switch tabs
Problem
Submissions

Problem: Count Pairs Of Similar Strings

med
30 min
Try to solve the Count Pairs Of Similar Strings problem.

Statement

You are given an array of strings words indexed starting from 00.

Two strings are considered similar if they consist of the exact same set of characters.

Return the total number of pairs (i,j)(i, j) such that 0≤i<j<0 \leq i < j < words.length, where words[i] and words[j] are similar.

Constraints:

  • 1≤1 \leq words.length ≤100\leq 100

  • 1≤1 \leq words[i].length ≤100\leq 100

  • words[i] consists only of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Pairs Of Similar Strings

med
30 min
Try to solve the Count Pairs Of Similar Strings problem.

Statement

You are given an array of strings words indexed starting from 00.

Two strings are considered similar if they consist of the exact same set of characters.

Return the total number of pairs (i,j)(i, j) such that 0≤i<j<0 \leq i < j < words.length, where words[i] and words[j] are similar.

Constraints:

  • 1≤1 \leq words.length ≤100\leq 100

  • 1≤1 \leq words[i].length ≤100\leq 100

  • words[i] consists only of lowercase English letters.