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.
Can u please explain, how did u arrive at the expression for sum+=arr[i][j+x]+arr[i+2][j+x]? I can understand that its the sum of values at specific indices as per the pattern. But how did u arrive at this expression?Is there any shortcuts or methods to arrive at the polynomial expression?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 11: 2D Arrays
You are viewing a single comment's thread. Return to all comments →
Can u please explain, how did u arrive at the expression for sum+=arr[i][j+x]+arr[i+2][j+x]? I can understand that its the sum of values at specific indices as per the pattern. But how did u arrive at this expression?Is there any shortcuts or methods to arrive at the polynomial expression?