// Path: src/main/java/com/hackerrank/BreadthFirstSearchShortestReach.java
// static class Graph {
//     boolean[][] nodes;
// 
//     Graph(int size) {
//         nodes = new boolean[size][size];
//     }
// 
//     void addEdge(int u, int v) {
//         nodes[u][v] = true;
//         nodes[v][u] = true;
//     }
// 
//     Set<Integer> getEdges(int u) {
//         Set<Integer> result = new HashSet<>();
//         for (int i = 0; i < nodes.length; i++) {
//             if (nodes[u][i]) {
//                 result.add(i);
//             }
//         }
//         return result;
//     }
// }
// 
// Path: src/main/java/com/hackerrank/BreadthFirstSearchShortestReach.java
// static String shortestDistanceForAllNodes(int s, int n, Graph graph) {
//     StringBuilder sb = new StringBuilder();
//     int[] distances = shortestDistances(s, graph);
//     for (int i = 0; i < n; i++) {
//         if (distances[i] != 0) {
//             sb.append(distances[i]).append(" ");
//         }
//     }
//     return sb.toString().trim();
// }


import com.hackerrank.BreadthFirstSearchShortestReach.Graph;
import org.junit.Test;
import static com.hackerrank.BreadthFirstSearchShortestReach.shortestDistanceForAllNodes;
import static org.assertj.core.api.Assertions.assertThat;
package com.hackerrank;



public class BreadthFirstSearchShortestReachTest {

    @Test
    public void shouldFindSingleJumpDistances() {
        int start = 0;
// Path: src/main/java/com/hackerrank/BreadthFirstSearchShortestReach.java
// static class Graph {
//     boolean[][] nodes;
// 
//     Graph(int size) {
//         nodes = new boolean[size][size];
//     }
// 
//     void addEdge(int u, int v) {
//         nodes[u][v] = true;
//         nodes[v][u] = true;
//     }
// 
//     Set<Integer> getEdges(int u) {
//         Set<Integer> result = new HashSet<>();
//         for (int i = 0; i < nodes.length; i++) {
//             if (nodes[u][i]) {
//                 result.add(i);
//             }
//         }
//         return result;
//     }
// }
// 
// Path: src/main/java/com/hackerrank/BreadthFirstSearchShortestReach.java
// static String shortestDistanceForAllNodes(int s, int n, Graph graph) {
//     StringBuilder sb = new StringBuilder();
//     int[] distances = shortestDistances(s, graph);
//     for (int i = 0; i < n; i++) {
//         if (distances[i] != 0) {
//             sb.append(distances[i]).append(" ");
//         }
//     }
//     return sb.toString().trim();
// }


// Path: src/test/java/com/hackerrank/BreadthFirstSearchShortestReachTest.java
import com.hackerrank.BreadthFirstSearchShortestReach.Graph;
import org.junit.Test;
import static com.hackerrank.BreadthFirstSearchShortestReach.shortestDistanceForAllNodes;
import static org.assertj.core.api.Assertions.assertThat;

package com.hackerrank;



public class BreadthFirstSearchShortestReachTest {

    @Test
    public void shouldFindSingleJumpDistances() {
        int start = 0;
        Graph graph = new Graph(3);