Skip to content

Instantly share code, notes, and snippets.

Benjamin Liu benjaminliu

Block or report user

Report or block benjaminliu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@benjaminliu
benjaminliu / WaterBetweenNumberWalls.java
Last active Dec 27, 2015
twitter water in walls problem
View WaterBetweenNumberWalls.java
public class WaterBetweenNumberWalls {
public static void main(String[] args) {
int maxStorage = 0;
int[] nums = { 2, 5, 1, 3, 1, 2, 1, 7, 7, 6 };
// int[] nums = { 2, 5, 1, 2, 3, 4, 7, 7, 6 };
// int[] nums = { 2, 5, 1, 2, 3, 4, 7, 5, 6 };
// int[] nums = { 6, 1, 4, 6, 7, 5, 1, 6, 4 };
// int[] nums = { 2, 7, 2, 7, 4, 7, 1, 7, 3, 7 };
You can’t perform that action at this time.