Wednesday, April 23, 2014

Shipped!

A little late, but here's what I've been working on at Twitter for the last couple of months.

“This a big step for media sharing on the platform — particularly because it allows multiple pieces of rich media into a single tweet that is both visible and embeddable from mobile and desktop”

It's a good way to blast out your favorite pictures from a trip, party or show without spamming your stream with photo tweet after photo tweet — your followers will thank you.”

Calculating Water

I came across this interesting programming challenge and couldn't help but dig in and solve it for myself. The solution below is a re-write of the approach I found in this book. My first (less efficient) solution involved a breadth first traversal of a histogram "graph" storing visited & filled cells in a HashSet. 

The follow up question to this is even more interesting:
"Solve this problem with an algorithm that accesses A's elements in order and can read an element only once. Use minimal additional space."