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.
how does it makes a difference if i first calculated array after all operations by adding to it its previous value and then finding the maximum value of that array in seperate loop,
and by simply adding the value and checking it for maximum value ??
i think both will take o(n).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
how does it makes a difference if i first calculated array after all operations by adding to it its previous value and then finding the maximum value of that array in seperate loop, and by simply adding the value and checking it for maximum value ??
i think both will take o(n).