Thoughts on technology, the world, and life

Code

A Queue Implemented With Two Stacks

Building first-in, first-out behavior from stacks

A Stack Implemented With Two Queues

Building last-in, first-out behavior from queues

Binary Tree Mirror Equals

Recursively comparing two trees as mirror images

Can You Make A Ransom Note From A Magazine?

Counting characters to see whether the letters are available

Convert A Sorted Array To A Binary Search Tree

Recursively building a search tree from sorted values

Decide If A Binary Tree Is A Binary Search Tree

Checking a binary tree’s ordering in Java

Decide Whether A Binary Tree Is Balanced

Checking subtree heights recursively in Java

E Piss Bed

A mnemonic for approaching algorithmic interview problems

Find A Substring

A Java implementation of substring matching

Go Raised The Bar

What a modern programming language should come with

Is An Integer A Power Of Two?

A short bitwise check in Java

Parse A Signed Integer

Converting a signed numeric string in Java

Partition Tree Nodes By Level

Grouping a binary tree’s nodes by depth

Rename Files To Their Checksums

A Bash script for organizing files by content hash

Reorder An Array Randomly

A Java implementation of array shuffling

Search For A Path In A Graph

A Java graph traversal for checking reachability

SQL Injection Can Compromise The OS

One database vulnerability can reach beyond the database

Stack That Tracks The Minimum Element

Keeping track of the smallest value as elements come and go

Tower Of Hanoi

A Java solution to the classic disk-moving puzzle

π