Aryadev Chavali
cb0d4f5207
Added helper method to allocate nodes from the vector for me
...
The vector acts as an arena for the nodes to be allocated from, better
and faster than allocating each child on the heap individually.
2024-07-26 02:54:02 +01:00
Aryadev Chavali
ee1cc0816a
Queue based iteration procedure
...
Pops an item off the queue and generate left and right children for it,
if those are empty. Then push those children into the queue for the
next iteration.
NOTE: Because we're using a queue, this does a breadth first
generation of the tree, which is what we want.
2024-07-26 02:54:02 +01:00
Aryadev Chavali
9769337a92
Binary tree of fractions
...
Will be used in creating the cw tree.
2024-07-26 02:54:02 +01:00
Aryadev Chavali
cc51f78d10
Simplify at constructor in Fraction
...
Let's just deal with simplified stuff anyway?
2024-07-26 02:54:02 +01:00
Aryadev Chavali
6d64f5ebac
Added comparators to Fraction struct
2024-07-26 02:54:02 +01:00
Aryadev Chavali
f64a82c538
Extracted gcd algorithm into its own function
2024-07-26 02:54:02 +01:00
Aryadev Chavali
0727126061
Simple fraction structure
...
Holds numerator and denominator. Can self simplify, but not
automatically.
2024-07-26 02:54:02 +01:00
Aryadev Chavali
6f7be667e2
Hello, world!
2024-07-26 02:54:02 +01:00