From 0a330e65f902dcbf750d0f0666c737dd9335f76d Mon Sep 17 00:00:00 2001 From: edu san <33841139+econdepe@users.noreply.github.com> Date: Fri, 15 Feb 2019 03:00:22 +0100 Subject: [PATCH] Correct a typo in pairwise.english.md (#34375) The word "indice" does not exist in English. The singular form of "indices" is "index". --- .../08-coding-interview-prep/algorithms/pairwise.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/08-coding-interview-prep/algorithms/pairwise.english.md b/curriculum/challenges/english/08-coding-interview-prep/algorithms/pairwise.english.md index eaca070054..45b2229ec9 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/algorithms/pairwise.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/algorithms/pairwise.english.md @@ -7,7 +7,7 @@ challengeType: 5 ## Description
Given an array arr, find element pairs whose sum equal the second argument arg and return the sum of their indices. -You may use multiple pairs that have the same numeric elements but different indices. Each pair should use the lowest possible available indices. Once an element has been used it cannot be reused to pair with another element. For instance, pairwise([1, 1, 2], 3) creates a pair [2, 1] using the 1 at indice 0 rather than the 1 at indice 1, because 0+2 < 1+2. +You may use multiple pairs that have the same numeric elements but different indices. Each pair should use the lowest possible available indices. Once an element has been used it cannot be reused to pair with another element. For instance, pairwise([1, 1, 2], 3) creates a pair [2, 1] using the 1 at index 0 rather than the 1 at index 1, because 0+2 < 1+2. For example pairwise([7, 9, 11, 13, 15], 20) returns 6. The pairs that sum to 20 are [7, 13] and [9, 11]. We can then write out the array with their indices and values.
Index01234
Value79111315
Below we'll take their corresponding indices and add them.