Binary tree of fractions

Will be used in creating the cw tree.
This commit is contained in:
2024-07-26 01:40:48 +01:00
parent cc51f78d10
commit 9769337a92

View File

@@ -19,6 +19,7 @@
#include <sstream>
#include <string>
#include <vector>
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define MAX(A, B) ((A) > (B) ? (A) : (B))
@@ -73,6 +74,19 @@ struct Fraction
}
};
struct Node
{
Fraction value;
Node *left, *right;
Node(Fraction val, Node *left = nullptr, Node *right = nullptr)
: value{val}, left{left}, right{right}
{
}
};
std::vector<Node> nodes;
int main(void)
{
puts("Hello, world!");