set[] = {1, 7, 10, 15, 27, 29}
output = 3
The longest arithmetic progression is {1, 15, 29}
set[] = {5, 10, 15, 20, 25, 30}
output = 6
The whole set is in AP
Longest Arithmetic Progression
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||