7 stories


You have a tree data structure. Write an algorithm that given any two nodes in the tree, finds the node that is the closest common ancestor to them.

606 views Amin A.

Given an HTML with messed up tag nesting, output the correct and unambiguous version of the HTML.

470 views Amin A.

Given that a tree is made of only red or black nodes, return another tree that only has the paths of the original tree leading to a red node.

476 views Amin A.

Reverse the order of the words in a String in-place.

463 views Amin A.

Write an algorithm that takes a tree data structure and writes out all the elements in a breadth-first traversal order.

473 views Amin A.

Write the algorithm that LinkedIn.com uses to tell you how many professionals you have access to.

454 views Amin A.

You have trillions of URLs stored uniquely, without order, across numerous machines, each with a score. Find the 1000 URLs with the highest scores.

529 views Amin A.