Skip to content

Commit 6b6b7a4

Browse files
committed
Clarify dependency of Array Merge on Mergesort
This adds some text in the README that attempts to clarify the dependency of the Array Merge part of the lab on Mergesort.
1 parent 49f1c8c commit 6b6b7a4

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ Some things to watch our for:
129129

130130
There are more comprehensive tips and suggestions in `Tips_and_suggestions.md` in the repository.
131131

132+
:bangbang: The Array Merge problem depends on the Mergesort problem, so you really
133+
should do Mergesort first. The GitHub Actions (that run the tests automatically and
134+
create things like the status badges) actually include `mergesort.c` when they
135+
compile the Array Merge code, so if `mergesort.c` is incomplete or otherwise
136+
broken that will cause the Array Merge tests to fail.
137+
132138
### Mergesort
133139

134140
Your task here is to implement a well known sorting algorithm in C,
@@ -222,7 +228,22 @@ the array without messing with that important first element.
222228
You can use references like `../mergesort/mergesort.h` or
223229
`../mergesort/mergesort.c` to access appropriate files in that part of
224230
the project, either in things like `#include` statements or
225-
in `gcc/g++` calls.
231+
in `gcc/g++` calls. The command in the GitHub Actions to compile
232+
the Array Merge tess, for example, is:
233+
234+
```text
235+
g++ -Wall -g -o array_merge_test ../mergesort/mergesort.c array_merge.c array_merge_test.cpp -lgtest -pthread -std=c++0x
236+
```
237+
238+
Note that the `../mergesort/mergesort.c` in this command includes
239+
the Mergesort `.c` file in the list of files that will be compiled
240+
and linked together to form the `array_merge_test` executable.
241+
That has two major implications:
242+
243+
- You *must* have a working `mergesort.c` in order to get the GitHub
244+
Actions for Array Merge to compile successfully.
245+
- You *can* (and presumably should?) use the function `mergesort()` that
246+
you define in the other part of the lab here in Array Merge.
226247

227248
## Final Words
228249

0 commit comments

Comments
 (0)