I recently came across an algorithm that can involve a few different sorting methods, and found it helpful in reviewing basic sorting implementations in Ruby. As an added bonus, it is wintry.
Given a linked list and an amount to rotate by, return the linked list rotated counter-clockwise.
For example, given the linked list…
1 → 2 → 3 → 4 → 5 → 6
A word ladder is a series of words created by changing one letter at a time. Here’s one example:
ball → tall → tale → take → lake → like