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.
It says that the two consecutive problems that you solve in a given day should have a minimum difference of K in their vi ( and not every pair of problems that you solve in a given day)
n=5, k=1; 5 3 4 5 6 is can be solved in a given day because that sequence has atleast a variation of 1 between consecutive numbers that is met.
However, if instead it was n=3, k=1; 5 5 6, then you need minimum 2 days to solve it.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Problem solving
You are viewing a single comment's thread. Return to all comments →
It says that the two consecutive problems that you solve in a given day should have a minimum difference of K in their vi ( and not every pair of problems that you solve in a given day)
n=5, k=1; 5 3 4 5 6 is can be solved in a given day because that sequence has atleast a variation of 1 between consecutive numbers that is met.
However, if instead it was n=3, k=1; 5 5 6, then you need minimum 2 days to solve it.