Maximum difference between adjacent elements of list: Difference between revisions

(Added XPL0 example.)
Line 17:
see "Output:" + nl
sList = [2,-3,0,1,1,-2.3,0,5.5,8,6,2,9,11,8,1]
oldDiff = fabs(sList[1]-sList[2])
first = sList[1]
second = sList[2]
sortList = []
add(sortList,[oldDiff,first,second])
 
for n = 1 to len(sList)-1
2,468

edits