Skip to content

Computer-and-Information-Science/cisc230-test1-code

Repository files navigation

CISC 230 - Test 1 Code

Many questions for Test 1 relate to code included in this repository. Take time to examine the programs in this repository prior to beginning the test.

You may want to have this repository open for reference while taking the test.

bubblesort.cpp

This program includes three functions, each a variation of the Bubble Sort algorithm. Descriptions of each variation appear in the source code just prior to each function implementation.

findmax.cpp

This program includes a recursive function for finding the maximum value in an array of integers.

matrix.cpp

This program creates a matrix (two-dimensional array) using the STL vector class. The array is populated with values. Comments are included at the beginning of the source code to describe how the matrix values are populated.

mergesort.cpp

This program includes a non-recursive version of merge sort. It is basically the same as header file merge2.h that was included in the sort algorithm repository presented in class. The merge process uses pointer arithmetic, however the workings of the merge function are not referenced by any test questions. Only the mergesort function is involved in the test.

sum1n.cpp

This program includes three functions, each of which calculates the sum of the integers 1 through N. One of the functions, sum2, is recursive.

sumarray.cpp

This program includes two functions, each of which calculates the sum of the values in an array of integers. Both functions are recursive. See comments in the source code as to the approach for each function.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published