Update MP2 (idk anymore)

This commit is contained in:
2024-03-10 00:49:58 -06:00
parent 756d08231a
commit 53268a2dc0
25 changed files with 3584 additions and 946 deletions

View File

@@ -143,19 +143,18 @@ std::vector<int> getRowMap(std::vector<std::tuple<int, int>> locationVector, int
std::string printVector(std::vector<int> arr, std::vector<int> locationVector = {-1}) {
std::string output = "{";
std::map<std::string, int> columnMap;
if (locationVector[0] != -1) {
printf("%s", printVector(locationVector).c_str());
}
for (int i = 0; i < arr.size(); ++i) {
// check if iteration value matches one of the locationVector values. If it does, append an ASCII color sequence.
if (binarySearch(locationVector, i) == i) {
int binSearchResult = binarySearch(locationVector, i);
//printf("bin search result:%i", binSearchResult);
if (binSearchResult > -1) {
output.append(colorIterator());
}
output.append(std::to_string(arr[i]));
if ((arr.size() - 1) > i) {
output.append(", ");
}
if (binarySearch(locationVector, i) == i) {
if (binSearchResult > -1) {
output.append(COLOR_WHITE.c_str());
}