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 + j + k != N is just an added condition in this problem so you can use 1 if statement inside your list compehension syntax. It can be greater than N as long as i, j and k are in their respective limits.
Lexicographic order is sorted order where 1, 1, 1 comes before 1, 1, 2 and 2, 1, 2 comes before 2, 2, 1 etc. etc.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
List Comprehensions
You are viewing a single comment's thread. Return to all comments →
i + j + k != N is just an added condition in this problem so you can use 1 if statement inside your list compehension syntax. It can be greater than N as long as i, j and k are in their respective limits.