Re:Data structures and algorithms practice problems and thei...
by anameaname on Sunday November 26, 2017 @05:04AM
(#15780219)
Some of these answers are not great, and wouldn't stand up to interview scrutiny. For example, the "Check if linked list is palindrome or not" problem says copying the list would be too expensive. The proposed answer (recursion) some how avoids this.
The solution is technically right, but it's making a copy of the list too. The intuition is wrong.
The solution is technically right, but it's making a copy of the list too. The intuition is wrong.