diff --git a/docs/api/lv.id.jc.algorithm/lv/id/jc/algorithm/graph/BreadthFirstSearch.html b/docs/api/lv.id.jc.algorithm/lv/id/jc/algorithm/graph/BreadthFirstSearch.html
new file mode 100644
index 0000000..f8b744e
--- /dev/null
+++ b/docs/api/lv.id.jc.algorithm/lv/id/jc/algorithm/graph/BreadthFirstSearch.html
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
Coverage Summary for Class: DijkstrasAlgorithm (lv.id.jc.algorithm.graph)
+
+
+
+ | Class |
+
+ Class, %
+ |
+
+ Method, %
+ |
+
+ Line, %
+ |
+
+
+ | DijkstrasAlgorithm |
+
+
+ 100%
+
+
+ (1/1)
+
+ |
+
+
+ 100%
+
+
+ (3/3)
+
+ |
+
+
+ 100%
+
+
+ (20/20)
+
+ |
+
+
+
+
+
+
+
+
+
+1 package lv.id.jc.algorithm.graph;
+2
+3 import java.util.HashMap;
+4 import java.util.LinkedList;
+5 import java.util.List;
+6 import java.util.Objects;
+7
+8 import static java.util.stream.Stream.iterate;
+9
+10 /**
+11 * Algorithm for finding the fastest paths between nodes in a graph.
+12 * <p>
+13 * The algorithm uses information about edge's distance to find the fastest path.
+14 *
+15 * @param <T> type of vertex id
+16 */
+17 public class DijkstrasAlgorithm<T> implements SearchAlgorithm<T> {
+18
+19 @Override
+20 public List<T> findPath(Graph<T> graph, T source, T target) {
+21 final var queue = new LinkedList<T>();
+22 final var distances = new HashMap<T, Double>();
+23 final var previous = new HashMap<T, T>();
+24 queue.add(source);
+25 distances.put(source, .0);
+26
+27 while (!queue.isEmpty()) {
+28 final var prev = queue.removeFirst();
+29 graph.edges(prev).forEach((node, time) -> {
+30 final var distance = distances.get(prev) + time.doubleValue();
+31 if (distance < distances.getOrDefault(node, Double.MAX_VALUE)) {
+32 previous.put(node, prev);
+33 distances.put(node, distance);
+34 queue.addLast(node);
+35 }
+36 });
+37 }
+38 if (previous.containsKey(target) || source.equals(target)) {
+39 final var path = new LinkedList<T>();
+40 iterate(target, Objects::nonNull, previous::get).forEach(path::addFirst);
+41 return path;
+42 }
+43 return List.of();
+44 }
+45
+46 }
+
+
+
+
+
+
+
+
+
diff --git a/docs/coverage/ns-1/sources/source-3.html b/docs/coverage/ns-1/sources/source-3.html
new file mode 100644
index 0000000..56deda3
--- /dev/null
+++ b/docs/coverage/ns-1/sources/source-3.html
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
Coverage Summary for Class: Graph (lv.id.jc.algorithm.graph)
+
+
+
+
+ | Class |
+
+ Method, %
+ |
+
+ Line, %
+ |
+
+
+ | Graph |
+
+
+ 100%
+
+
+ (3/3)
+
+ |
+
+
+ 100%
+
+
+ (7/7)
+
+ |
+
+
+ | Graph$getDistance |
+
+
+ | Total |
+
+
+ 100%
+
+
+ (3/3)
+
+ |
+
+
+ 100%
+
+
+ (7/7)
+
+ |
+
+
+
+
+
+
+
+
+1 package lv.id.jc.algorithm.graph;
+2
+3 import java.util.List;
+4 import java.util.Map;
+5 import java.util.stream.IntStream;
+6
+7 /**
+8 * A generic graph representation
+9 *
+10 * @param <T> type of vertex id
+11 */
+12 public record Graph<T>(Map<T, Map<T, Number>> nodes) {
+13
+14 /**
+15 * Edges of the given vertex
+16 *
+17 * @param id vertex (node)
+18 * @return all connections for the given vertex id
+19 */
+20 public Map<T, Number> edges(T id) {
+21 return nodes().get(id);
+22 }
+23
+24 /**
+25 * Returns the calculated distance for the given path
+26 *
+27 * @param path the list of vertex ids representing the path
+28 * @return distance for the given path as double
+29 * @throws NullPointerException if path is incorrect and contains more than one vertex
+30 */
+31 public double getDistance(final List<T> path) {
+32 return IntStream
+33 .range(1, path.size())
+34 .mapToObj(i -> edges(path.get(i - 1)).get(path.get(i)))
+35 .mapToDouble(Number::doubleValue)
+36 .sum();
+37 }
+38 }
+
+
+
+
+
+
+
+
+
diff --git a/docs/coverage/ns-1/sources/source-4.html b/docs/coverage/ns-1/sources/source-4.html
new file mode 100644
index 0000000..fcce85a
--- /dev/null
+++ b/docs/coverage/ns-1/sources/source-4.html
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
Coverage Summary for Class: SearchAlgorithm (lv.id.jc.algorithm.graph)
+
+
+
+
+ | Class |
+
+
+ | SearchAlgorithm$findPath |
+
+
+ | Total |
+
+
+
+
+
+
+
+
+1 package lv.id.jc.algorithm.graph;
+2
+3 import java.util.List;
+4
+5 /**
+6 * A functional interface for graph search algorithm
+7 *
+8 * @param <T> type of vertex id
+9 */
+10 @FunctionalInterface
+11 public interface SearchAlgorithm<T> {
+12 /**
+13 * Find the path from the source node to the target
+14 *
+15 * @param graph The graph in which we search for the path
+16 * @param source Search starting point identifier
+17 * @param target Search finish point identifier
+18 * @return Path found or empty list if path cannot be found
+19 */
+20 List<T> findPath(Graph<T> graph, T source, T target);
+21 }
+
+
+
+
+
+
+
+
+