mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
@@ -1,28 +1,21 @@
|
||||
package com.thealgorithms.searches;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class BreadthFirstSearchTest {
|
||||
|
||||
private static final DepthFirstSearch.Node rootNode = new DepthFirstSearch.Node(
|
||||
"A",
|
||||
List.of(
|
||||
new DepthFirstSearch.Node(
|
||||
"B",
|
||||
List.of(
|
||||
new DepthFirstSearch.Node("D"),
|
||||
new DepthFirstSearch.Node("F", List.of(new DepthFirstSearch.Node("H"), new DepthFirstSearch.Node("I")))
|
||||
)
|
||||
),
|
||||
new DepthFirstSearch.Node("C", List.of(new DepthFirstSearch.Node("G"))),
|
||||
new DepthFirstSearch.Node("E")
|
||||
)
|
||||
);
|
||||
private static final DepthFirstSearch.Node rootNode = new DepthFirstSearch.Node("A",
|
||||
List.of(
|
||||
new DepthFirstSearch.Node("B",
|
||||
List.of(new DepthFirstSearch.Node("D"),
|
||||
new DepthFirstSearch.Node("F",
|
||||
List.of(new DepthFirstSearch.Node("H"), new DepthFirstSearch.Node("I"))))),
|
||||
new DepthFirstSearch.Node("C", List.of(new DepthFirstSearch.Node("G"))),
|
||||
new DepthFirstSearch.Node("E")));
|
||||
|
||||
@Test
|
||||
void searchI() {
|
||||
|
||||
Reference in New Issue
Block a user