### Author Topic: Can this algorithm be made more efficient?  (Read 6176 times)

• Hero Member
• Posts: 7136
##### Re: Can this algorithm be made more efficient?
« Reply #60 on: July 10, 2018, 05:36:13 pm »
What is your intended result, if

set1 = [5];
set2 = [5,5,5];    // this is possible as this is array, net set.

Then should the result (num)  1.5?
Obviously you are not proficient in Pascal. < >

My code does what it says.
« Last Edit: July 10, 2018, 06:25:51 pm by Thaddy »
inline variables like in D10.3 are a bit like Brexit: if you are given the wrong information it sounds like a good idea. Every kid loves candy, but it makes you fat and your teeth will disappear.

#### egsuh

• Full Member
• Posts: 173
##### Re: Can this algorithm be made more efficient?
« Reply #61 on: July 13, 2018, 01:48:48 pm »
I know my syntax is wrong. I'm just asking what is the INTENDED result.

In the original example, some figures (17.5 and 17.6) of set2 appear twice.  And based on the LOGIC of the original example, any number in the set1 which is larger than the figures appearing more than once in the set2 will gain two or more points.

I'm just asking this is the intended result.