Find duplicate values

• 1. value
• 2. value
• 3. value

Outputs

• Duplicate value

Neuron type

Best algorithm has been found - locked

Patterns

Pattern Input Output
1.
 1. value: 3 2. value: 3 3. value: 4
 Duplicate value: 3
2.
 1. value: 4 2. value: 2 3. value: 2
 Duplicate value: 2
3.
 1. value: 2 2. value: 1 3. value: 2
 Duplicate value: 2
4.
 1. value: 4 2. value: 4 3. value: 3
 Duplicate value: 4
5.
 1. value: 5 2. value: 1 3. value: 5
 Duplicate value: 5

Applicable neurons

• IF
• a > b
• a = b
• a < b
• a ≤ b
• a ≥ b
• a is not b
• IF a=b THEN c ELSE d
• IF (1) THEN a ELSE b
• max (from 2 values)
• min (from 2 values)
• equilateral polygon - Perimeter
• (a, b)
• empty string change into zero
• character z
• word city
• right bottom
• Is character uppercase?

Algorithm

Test

```/**
* a = b: IF a=b THEN 1 ELSE 0;
*
* @param x1 a
* @param x2 b
* @return {Array}
*/
function neuron591(x1, x2)
{
return [(x1 == x2) ? 1 : 0];
}

/**
* IF: IF a THEN b ELSE c;
*
* @param x1 condition (1/0)
* @param x2 variable for 1
* @param x3 variable for 0
* @return {Array}
*/
function neuron579(x1, x2, x3)
{
return [(x1) ? x2 : x3];
}

/**
* IF a=b THEN c ELSE d:
*
* @param x1 a
* @param x2 b
* @param x3 c
* @param x4 d
* @return {Array}
*/
function neuron724(x1, x2, x3, x4)
{
var outputs = [];
outputs[0] = x1;
outputs[1] = x2;
outputs[2] = x3;
outputs[3] = x4;

arr = neuron591(outputs[1], outputs[0]);
outputs[4] = arr[0];

arr = neuron579(outputs[4], outputs[2], outputs[3]);
outputs[5] = arr[0];

return[outputs[5]];
}

/**
* Find duplicate values:
*
* @param x1 1. value
* @param x2 2. value
* @param x3 3. value
* @return {Array}
*/
function neuron909(x1, x2, x3)
{
var outputs = [];
outputs[0] = x1;
outputs[1] = x2;
outputs[2] = x3;

arr = neuron724(outputs[0], outputs[2], outputs[2], outputs[1]);
outputs[3] = arr[0];

return[outputs[3]];
}

```