diff --git a/src/Assignments/A2/Partition.java b/src/Assignments/A2/Partition.java index b9c4019..fc173d7 100644 --- a/src/Assignments/A2/Partition.java +++ b/src/Assignments/A2/Partition.java @@ -61,11 +61,25 @@ package Assignments.A2; import java.util.ArrayList; import java.util.List; +/** + * Generates, if possible, two equal subsets of a given set of elements that are equal to each other. + * + * @author Jonathan Turner + * @version Spring 2024 + */ public class Partition { private int[] set; private List> subsets; + public void performAlgorithm() { + + int totalSum = 0; + for (int i = 0; i < this.set.length; i++) { + totalSum += this.set[i]; + } + } + /** * Generates the list of subsets using Bit Shift Counting by iterating over all combinations of 1 to n. * After shifting the counter, the current subset is created initialized and if 1 shifted by j is logically diff --git a/src/Practice/Decrease_Conquer/FakeCoin.java b/src/Practice/Decrease_Conquer/FakeCoin.java index 893edf5..c2fc038 100644 --- a/src/Practice/Decrease_Conquer/FakeCoin.java +++ b/src/Practice/Decrease_Conquer/FakeCoin.java @@ -23,7 +23,11 @@ public class FakeCoin extends Application { * @postcondition a new FakeCoin application is created. */ public FakeCoin() { - super(new String[]{"The number of coins","Set FakeCoin Weight and Location","Find Fake Coin"}); + super(new String[]{ + "The number of coins", + "Set FakeCoin Weight and Location", + "Find Fake Coin" + }); this.setLocation = false; } @@ -78,7 +82,7 @@ public class FakeCoin extends Application { } private void performAlgorithm() { - + } /**