This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.junit.Test; | |
| import static org.junit.Assert.assertEquals; | |
| /** | |
| * Given a positive integer, return its corresponding column title as appear in an Excel sheet. | |
| * | |
| * Example: | |
| * 1 -> A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.junit.Test; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| /** | |
| * Given two numbers as arrays multiply them. | |
| */ | |
| public class MultiplyArray { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.junit.Test; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import static org.junit.Assert.assertEquals; | |
| /** | |
| * Given a binary tree, determine if it is height-balanced. | |
| * For this problem, a height-balanced binary tree is defined as a binary tree in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.junit.Test; | |
| import java.util.HashMap; | |
| import java.util.Stack; | |
| import static org.junit.Assert.assertFalse; | |
| import static org.junit.Assert.assertTrue; | |
| /** | |
| * Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Graphs; | |
| import org.junit.Test; | |
| import static org.junit.Assert.assertEquals; | |
| /** | |
| * Given a 2D matrix of characters like | |
| * BBBBBBB | |
| * GGBBBGG |