
Given a positive integer n, design an algorithm to order the numbers 1 through n such that there’s no arithmetic subsequence of length 3. In other words, there’s no tuple( ,k) such that i <j< kand A,-Ai Ak- Aj (where Ai is the ith number in your ordering). Analyze the runtime of your algorithm, and explain your answer Hint: First try to solve the problem for values of n which are powers of 2: solve the
PayPal Gateway not configured
PayPal Gateway not configured