Skip to content

Instantly share code, notes, and snippets.

View mutebironald's full-sized avatar
🏠
Working from home

Ronald Mutebi mutebironald

🏠
Working from home
View GitHub Profile
@kidGodzilla
kidGodzilla / invert-binary-tree.js
Created May 28, 2016 19:42
Invert a Binary Tree in Javascript
// This problem was inspired by this original tweet by Max Howell:
// Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so fuck off.
// So, let's invert a binary tree in Javascript
// Original Tree
// 4
// / \
// 2 7
// / \ / \