Skip to content

Instantly share code, notes, and snippets.

View nnemtcev's full-sized avatar

Nick Nemtcev nnemtcev

View GitHub Profile
@jzDev
jzDev / checkIfSuperBalancedTree.js
Last active June 2, 2020 04:38
Write a function to see if a binary tree is "superbalanced"
class BinaryTreeNode {
constructor(value) {
this.value = value;
this.left = null;
this.right = null;
}
insertLeft(value) {
this.left = new BinaryTreeNode(value);
return this.left;