-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecursion.h
31 lines (24 loc) · 865 Bytes
/
recursion.h
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
#pragma once
/* Needed for warmup.cpp */
int factorial(int n);
double iterativePower(int base, int exp);
double power(int base, int exp);
/* Needed for balanced.cpp */
#include <string>
bool isBalanced(std::string str);
std::string operatorsFrom(std::string str);
bool operatorsAreMatched(std::string ops);
/* Needed for sierpinski.cpp */
#include "gtypes.h"
#include "gwindow.h"
void fillBlackTriangle(GWindow& window, GPoint one, GPoint two, GPoint three);
int drawSierpinskiTriangle(GWindow& window,
GPoint one, GPoint two, GPoint three,
int order);
void runInteractiveDemo();
/* Needed for merge.cpp */
#include "queue.h"
#include "vector.h"
Queue<int> binaryMerge(Queue<int> a, Queue<int> b);
Queue<int> naiveMultiMerge(Vector<Queue<int>>& all);
Queue<int> recMultiMerge(Vector<Queue<int>>& all);