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.
This algorithm doesnt work for all examples, for suppose if the inputs are n=9,m=3 and m inputs are (3,6,3), (5,7,10),(7,9,11). At 6th index we get the maximum 23 as output, but as per by the above algorithm we get the maximum value is 13.
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 →
This algorithm doesnt work for all examples, for suppose if the inputs are n=9,m=3 and m inputs are (3,6,3), (5,7,10),(7,9,11). At 6th index we get the maximum 23 as output, but as per by the above algorithm we get the maximum value is 13.