Tap here to switch tabs
Problem
Submissions

Problem: Number of Pairs of Strings That Concatenate to Target

Try to solve the Number of Pairs of Strings With Concatenation Equal to Target problem.

Statement

Given an array of digit strings nums and a digit string target, return the number of pairs of indices (i, j) such that i \neq j and the concatenation of nums[i] and nums[j] equals target.

Constraints:

  • 2≤2 \leq nums.length ≤100\leq 100

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

  • 2≤2 \leq target.length ≤100\leq 100

  • nums[i] and target consist of digits.

  • nums[i] and target do not have leading zeros.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Number of Pairs of Strings That Concatenate to Target

Try to solve the Number of Pairs of Strings With Concatenation Equal to Target problem.

Statement

Given an array of digit strings nums and a digit string target, return the number of pairs of indices (i, j) such that i \neq j and the concatenation of nums[i] and nums[j] equals target.

Constraints:

  • 2≤2 \leq nums.length ≤100\leq 100

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

  • 2≤2 \leq target.length ≤100\leq 100

  • nums[i] and target consist of digits.

  • nums[i] and target do not have leading zeros.