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.
Its always good to consider all the edge cases before providing any solution but when competitive programming come into picture then we should always consider the input first what i feel because type of input and size of input will create huge different. even it can change your complete algorithm.
And when you know they you are not going to get that kind of input then it does not make sense to code for it . there is a principle called YAGNI.
just have a look you will come to know, there is no place for dead code.
Number Line Jumps
You are viewing a single comment's thread. Return to all comments →
Its always good to consider all the edge cases before providing any solution but when competitive programming come into picture then we should always consider the input first what i feel because type of input and size of input will create huge different. even it can change your complete algorithm.
And when you know they you are not going to get that kind of input then it does not make sense to code for it . there is a principle called YAGNI.
just have a look you will come to know, there is no place for dead code.