Skip to content

Commit 7a5ce9c

Browse files
resolve Checkstyle errors (constructor + imports)
1 parent 88e5f7b commit 7a5ce9c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/java/com/thealgorithms/graph/TravelingSalesman.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010
* For more information, see <a href="https://en.wikipedia.org/wiki/Travelling_salesman_problem">Wikipedia</a>.
1111
* @author <a href="https://github.com/DenizAltunkapan">Deniz Altunkapan</a>
1212
*/
13+
1314
public class TravelingSalesman {
1415

16+
// Private constructor to prevent instantiation
17+
private TravelingSalesman() {}
18+
1519
/**
1620
* Solves the Traveling Salesman Problem (TSP) using brute-force approach.
1721
* This method generates all possible permutations of cities, calculates the total distance for each route, and returns the shortest distance found.

src/test/java/com/thealgorithms/graph/TravelingSalesmanTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.thealgorithms.graph;
22

3-
import static org.junit.jupiter.api.Assertions.*;
4-
3+
import static org.junit.jupiter.api.Assertions.assertEquals;
54
import org.junit.jupiter.api.Test;
65

76
public class TravelingSalesmanTest {

0 commit comments

Comments
 (0)