Skip to content

Commit 8ce1fea

Browse files
committed
Merge branch 'master' of https://github.com/bhoffman0/CSAwesome
2 parents 100c34f + 946a335 commit 8ce1fea

2 files changed

Lines changed: 25 additions & 24 deletions

File tree

_sources/Unit6-Arrays/MoreArrayPractice.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ More Code Practice with Arrays
3838
public class Sum13
3939
{
4040
public static int sum13(int[] nums)
41-
{
41+
{
4242
// ADD CODE HERE //
4343
}
4444

4545
public static void main(String[] args)
46-
{
46+
{
4747
int[] nums1 = {13, 1, 2};
4848
System.out.println(sum13(nums1));
4949

@@ -69,7 +69,7 @@ More Code Practice with Arrays
6969

7070
public class RunestoneTests extends CodeTestHelper {
7171
public RunestoneTests()
72-
{
72+
{
7373
super();
7474
}
7575

@@ -115,14 +115,14 @@ More Code Practice with Arrays
115115
public class Has22
116116
{
117117
public static boolean has22(int[] nums)
118-
{
118+
{
119119
// ADD CODE HERE //
120120

121121
}
122122

123123

124124
public static void main(String[] args)
125-
{
125+
{
126126

127127
int[] nums1 = {1, 2, 2};
128128
System.out.println(has22(nums1));
@@ -147,7 +147,7 @@ More Code Practice with Arrays
147147

148148
public class RunestoneTests extends CodeTestHelper {
149149
public RunestoneTests()
150-
{
150+
{
151151
super();
152152
}
153153

@@ -188,12 +188,12 @@ More Code Practice with Arrays
188188
public class Total89
189189
{
190190
public static int total89(int[] nums)
191-
{
191+
{
192192
// ADD CODE HERE //
193193
}
194194

195195
public static void main(String[] args)
196-
{
196+
{
197197
int[] nums1 = {1, 2};
198198
System.out.println(total89(nums1));
199199

@@ -213,7 +213,7 @@ More Code Practice with Arrays
213213

214214
public class RunestoneTests extends CodeTestHelper {
215215
public RunestoneTests()
216-
{
216+
{
217217
super();
218218
}
219219

@@ -259,12 +259,12 @@ More Code Practice with Arrays
259259
public class TwoSum
260260
{
261261
public static int[] twoSum(int[] nums, int target)
262-
{
262+
{
263263
// ADD CODE HERE //
264264
}
265265

266266
public static void main(String[] args)
267-
{
267+
{
268268
int[] nums = {2, 7, 11, 15};
269269
int target = 9;
270270
System.out.println(Arrays.toString(twoSum(nums, target)));
@@ -283,7 +283,7 @@ More Code Practice with Arrays
283283

284284
public class RunestoneTests extends CodeTestHelper {
285285
public RunestoneTests()
286-
{
286+
{
287287
super();
288288
}
289289

_sources/Unit8-2DArray/Array2dMoreCodePractice.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ More Code Practice with 2D Arrays
1717
public class SentenceModifier
1818
{
1919
public static String[][] findAndReplaceFirst(String[][] sentence, String target, String replacement)
20-
{
20+
{
2121
// ADD CODE HERE //
2222
}
2323

2424
public static void main(String[] args)
25-
{
25+
{
2626
String[][] document =
2727
{
2828
{"Hello", "world"},
@@ -38,9 +38,9 @@ More Code Practice with 2D Arrays
3838
String[][] updatedDocument = findAndReplaceFirst(document, target, replacement);
3939

4040
for (String[] row : updatedDocument)
41-
{
41+
{
4242
for (String word : row)
43-
{
43+
{
4444
System.out.print(word + " ");
4545
}
4646
System.out.println();
@@ -77,12 +77,12 @@ More Code Practice with 2D Arrays
7777
public class MaxOnesRowFinder
7878
{
7979
public static int findMaxOnes(int[][] matrix)
80-
{
80+
{
8181
// ADD CODE HERE //
8282
}
8383

8484
public static void main(String[] args)
85-
{
85+
{
8686
int[][] matrix =
8787
{
8888
{0, 1, 1},
@@ -126,12 +126,12 @@ More Code Practice with 2D Arrays
126126
public class SocialDistancingSeating
127127
{
128128
public static boolean isSeatAvailable(int[][] theater, int row, int column)
129-
{
129+
{
130130
// ADD CODE HERE //
131131
}
132132

133-
public static void main(String[] args)
134-
{
133+
public static void main(String[] args)
134+
{
135135
int[][] theater = {
136136
{0, 0, 1, 1},
137137
{1, 1, 0, 0},
@@ -171,14 +171,15 @@ More Code Practice with 2D Arrays
171171
~~~~
172172
import java.util.Arrays;
173173

174-
public class DiagonalSum {
174+
public class DiagonalSum
175+
{
175176
public static int[] diagonalSum(int[][] matrix)
176-
{
177+
{
177178
// ADD CODE HERE //
178179
}
179180

180181
public static void main(String[] args)
181-
{
182+
{
182183
int[][] matrix = {
183184
{1, 2, 3},
184185
{4, 5, 6},

0 commit comments

Comments
 (0)