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 java.util.ArrayList; | |
import java.util.List; | |
public class TravelCost { | |
private final static Integer[][] participants = {{500, 700}, {200, 600}, {400, 500}, {600, 200}, {500,300}}; | |
private final static int cityAmount = participants[0].length; | |
private final static List<Integer> result = new ArrayList<>(); | |
public static void main(String[] args) { |
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 java.util.LinkedList; | |
public class DepthSearch { | |
private static final String START = "B"; | |
private static final String END = "E"; | |
public static void main(String[] args) { | |
// this graph is directional | |
Graph graph = new Graph(); |
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 com.google.common.collect.Lists; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class SearchInList { | |
public static final ArrayList<List<String>> LIST = Lists.newArrayList( | |
Lists.newArrayList("a", "b"), | |
Lists.newArrayList("c", "d"), |
NewerOlder