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.
I went through the editorial and the initial 3-4 sentences makes good sense, but the part of calculating the sum over product of all possible unique triplet combinations and reducing it tothe 4 for loops each running in O(n) time, does not since it has not been talked about. Could some one explain this or at least point me to some resource which might ?
I'm sorry to sound annoying about the Editorial, but please single letter variable names like B, C, D, etc. ? Wouldn't meaningful variable names with some comments make reading the code much easier for everyone ? This is not the only editorial I'm seeing this in BTW, please HackerRank addressing this would benefit a lot of people.
Kundu and Tree
You are viewing a single comment's thread. Return to all comments →
I went through the editorial and the initial 3-4 sentences makes good sense, but the part of calculating the sum over product of all possible unique triplet combinations and reducing it tothe 4 for loops each running in O(n) time, does not since it has not been talked about. Could some one explain this or at least point me to some resource which might ?
I'm sorry to sound annoying about the Editorial, but please single letter variable names like B, C, D, etc. ? Wouldn't meaningful variable names with some comments make reading the code much easier for everyone ? This is not the only editorial I'm seeing this in BTW, please HackerRank addressing this would benefit a lot of people.