示例#1
0
  @Test
  public void thisAlwaysPasses() {
    Solution sol = new Solution();

    assertEquals(1, sol.lengthOfLongestSubstring("bbbbb"));
    assertEquals(3, sol.lengthOfLongestSubstring("abcabcbb"));
  }
示例#2
0
  @Test
  public void thisAlwaysPasses() {
    Solution sol = new Solution();

    TreeNode root = new TreeNode(3);

    root.left = new TreeNode(1);
    root.right = new TreeNode(5);

    root.left.right = new TreeNode(2);
    assertTrue(sol.isBalanced(root));
  }
示例#3
0
 @Test
 public void thisAlwaysPasses() {
   Solution sol = new Solution();
   assertEquals("231", sol.getPermutation(3, 4));
 }