We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
formula of sum of AP series (which is 1,3,5,...,2*n-1)
n/2*(a+(n-1)*d)
given d=2 and a=1(as a first term and d is difference between two numbers in the series)
which makes above equation n*n
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Summing the N series
You are viewing a single comment's thread. Return to all comments →
formula of sum of AP series (which is 1,3,5,...,2*n-1) n/2*(a+(n-1)*d) given d=2 and a=1(as a first term and d is difference between two numbers in the series) which makes above equation n*n