@Ritu: Your solution is incorrect. Consider
1 3 41 43 47 49 90 100 110 Maximum repeated 'd' value: '2' for the pairs (1,3), (41,43), (47,49) = 3 repeats. However, the sequences themselves are not part of an AP. The longest AP is of size 3 - (90, 100, 110) with a d of 10. -- DK http://twitter.com/divyekapoor http://www.divye.in -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/FnebaYc_FbIJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
