Created
June 18, 2018 18:20
-
-
Save damehta/b7b75e02f2273a7b9fff7953896b1669 to your computer and use it in GitHub Desktop.
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 com.dam.app.leetcode.easy; | |
import org.junit.Test; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* Created by 212546502 on 6/18/18. | |
*/ | |
public class No811SubdomainVisitCountTest { | |
@Test | |
public void subdomainVisits() throws Exception { | |
String[] input = {"9001 discuss.leetcode.com"}; | |
List<String> output = new ArrayList<String>(); | |
// output.add("9001 leetcode.com"); | |
// output.add("9001 discuss.leetcode.com"); | |
// output.add("9001 com"); | |
output = No811SubdomainVisitCount.subdomainVisits(input); | |
System.out.println("Input: " + Arrays.toString(input)); | |
System.out.println("Output: " + Arrays.toString(output.toArray())); | |
System.out.println(" "); | |
String[] input2 = {"900 google.mail.com", "50 yahoo.com", "1 intel.mail.com", "5 wiki.org"}; | |
List<String> output2 = new ArrayList<String>(); | |
output2 = No811SubdomainVisitCount.subdomainVisits(input2); | |
System.out.println("Input2: " + Arrays.toString(input2)); | |
System.out.println("Output2: " + Arrays.toString(output2.toArray())); | |
System.out.println(" "); | |
// assertArrayEquals(No811SubdomainVisitCount.subdomainVisits(input), (output)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment