LIST EXAMPLES:
LIST--> (57 56 97 97 56 57 97 97 56 57 97 97 56 97 56 97 56 97 56 105 97 56 97 56)
STEPS: REMOVE DUPLICATES FROM ABOVE LIST and ascending
= (56 57 97 105)
SO, TOTAL 4 ELEMENT VALUE
SO, 19/4.0
= 4.75
[ AT THE NEW LIST (57 56 97 105)
from above list for First Element = 4.75 x 1 == 4.75 (where 1 = element position)
for 2nd element 4.75 X 2 = 9.5 (where 2 = element position)
for 3rd element 4.75 X 3 = 14.25 (where 3 = element position)
for 4rd element 4.75 X 4 = 19 (where 4 = element position) ]
above calculation is after removing duplicates 4 elements are remaining, so we have divide 19 to the 4
if we have 12 element after removing duplicates then we have to divide 19 to the 12.
the ultimate results is: (9.5 4.75 14.25 14.25 4.75 9.5 14.25 14.25 4.75 9.5 14.25 14.25 4.75 14.25 4.75 14.25 4.75 14.25 4.75 19 14.25 4.75 14.25 4.75)
now we see second list
list = (64, 64, 51, 36, 36, 36)
after removing duplicates the list is (36 51 64)
so, we have to divide 19 to the 3 nos.
1. 6.3 --> for 36
2. 12.3 --> for 51
3. 19 --> for 64
list = (64, 64, 51, 36, 36, 36)
result= (6.3 6.3 12.3 6.3 6.3 6.3)
3rd example
list = (115 65 115 65 115 65 65 120 120 94 65 120 65 120 65 120 65 65 105 65 65 65 103 115)
after removing duplicate = (65 94 103 105 115 120) = total 6 element.
so, we have to divide 19/6.0 = 3.16
1. 3.16 (= 3.16)
2. 6.32 (= 3.16 *2)
3. 9.48 (= 3.16 *3)
4. 12.64 (= 3.16 * 4)
5. 15.8 (= 3.16 * 5)
6. 18.96 (= 3.16 *6)
final result is
= (15.8 3.16 15.8 3.16 15.8 3.16 3.16 19 19 6.32 3.16 19 3.16 19 3.16 19 3.16 3.16 105 3.16 3.16 3.16 9.48 15.8)