← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
You are given an array tasks containing the difficulty levels of n tasks. You need to assign exactly three distinct tasks to three representatives d1, d2, d3 chosen from this array such that the value |d1 - d2| + |d2 - d3| is maximized. Return the maximum possible value of this expression.