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.
Here's what I don't like about these simple problems. The requirements aren't clear.
How large is the linked list? Do you want to use recursion on a huge list and blow the stack? Do you have enough memory to create a copy? Do you want to optimize for space complexity or time complexity? Should the solution be non-destructive to the passed in list? (It doesn't help that you're not shown the implementation of the rest of the code).
This is a nifty site and a great tool for exercising your programming skills but it absolutely horrifies me that it has become a darling site for IT recruitment. A good programmer isn't a dirty programmer who doesn't think about real world complexities and instead aims for the quickest solution or least number of lines. The emphasis on speed also promotes bad habits in terms of commenting and formatting code.
Print in Reverse
You are viewing a single comment's thread. Return to all comments →
Here's what I don't like about these simple problems. The requirements aren't clear. How large is the linked list? Do you want to use recursion on a huge list and blow the stack? Do you have enough memory to create a copy? Do you want to optimize for space complexity or time complexity? Should the solution be non-destructive to the passed in list? (It doesn't help that you're not shown the implementation of the rest of the code). This is a nifty site and a great tool for exercising your programming skills but it absolutely horrifies me that it has become a darling site for IT recruitment. A good programmer isn't a dirty programmer who doesn't think about real world complexities and instead aims for the quickest solution or least number of lines. The emphasis on speed also promotes bad habits in terms of commenting and formatting code.