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 is the solution I thought of as well, but when I tried implementing it in C, I kept getting a segfault because the amount of memory you need to allocate for an array that large results in a stack overflow. is there a way to implement this solution in C?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Pairs
You are viewing a single comment's thread. Return to all comments →
this is the solution I thought of as well, but when I tried implementing it in C, I kept getting a segfault because the amount of memory you need to allocate for an array that large results in a stack overflow. is there a way to implement this solution in C?