Tech ramblings

From http://www.programcreek.com/2013/01/leetcode-remove-duplicates-from-sorted-list/: remove duplicate items from a sorted list. My initial version had a bug that I didn't catch till running. You can't increment the current pointer until all dups have been eliminated - nested inside the first while must be another while (not…

From every damn programming interview book ever. How to determine if a linked list is cyclical. Incidentally, I read a very interesting - interesting because it's so obvious and honest - critique of the logic behind using this question at all. His point is that you either know the answer…

Haven't done programming puzzles for a week due to busyness at work. This one is is from Programming Interviews Exposed. Implement delete and insertAfter while maintaining global pointers to head and tail. In C this time. I had 1 bug: forgot to increment the previous pointer in the while loop…

I completed my first test from the Programming Interview Exposed book. It took me over 45 minutes and I didn't get it right till I put it into the interpreter and iterated on it a few times. Clearly I have my work cut out for me. The problem: You have…