## palindrome

Some child's play. Is a sentence, ignoring everything except alphabetic characters, a palindrome? In JS: …

Some child's play. Is a sentence, ignoring everything except alphabetic characters, a palindrome? In JS: …

Heap Sort In part 4 of MIT 6006 goes into heap data structures and heap sort. Heap sort runs in O(nlog n) time provided the array is already a heap and displays the heap invariant: that each parent node is greater than or equal to both its children. The…

I have watched the first 3 episodes now of 6.006 Introduction to Algorithms. The third episode explains two basic sorting algorithms, insertion and merge. Here are the implementations of each in javascript. Mergesort is O(n log n) but requires space O(n). Insertion sort is O(n2) but…

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…