-
Notifications
You must be signed in to change notification settings - Fork 0
/
PA9.cpp
71 lines (52 loc) · 1.35 KB
/
PA9.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include "PA9.h"
// TODO: finish this function
int countDigits(string s) {
return -1; // TODO: fix this
}
// TODO: finish this function by testing countDigits()
void runTask1() {
}
// TODO: finish this function
int sumDigits(int num) {
return -1; // TODO: fix this
}
// TODO: finish this function by testing sumDigits()
void runTask2() {
}
// TODO: finish this function
bool isPalindrome(string s) {
return false; // TODO: fix this
}
// TODO: finish this function by testing isPalindrome()
void runTask3() {
}
// TODO: finish this function by testing getMaxValue() and getMaxValueHelper()
void runTask4() {
}
// TODO: finish this function
void generateSubstrings(string s, vector<string>& substrings) {
}
// TODO: finish this function by testing generateSubstrings()
void runTask5() {
}
// BONUS ONLY: utility function for BONUS task
// no need for any changes here
void displayMaze(char maze[8][8]) {
int i, j;
cout << " 0 1 2 3 4 5 6 7 8 9" << endl;
for(i = 0; i < 8; i++) {
cout << i;
for(j = 0; j < 8; j++) {
cout << " " << maze[i][j];
}
cout << endl;
}
cout << endl;
}
// TODO: BONUS ONLY finish this function
bool traverseMaze(char maze[8][8], Coordinates solution[], int * steps, int currRow, int currCol) {
return false; // TODO: fix this
}
// TODO: BONUS ONLY finish this function by testing traverseMaze()
void runBONUSTask() {
}