IX: {Series|(} {2}
IX: {Series!geometric|(} {4}
IX: {Euler’s constant} {4}
IX: {Series!geometric|)} {4}
IX: {Series!arithmetic|(} {4}
IX: {Series!arithmetic|)} {5}
IX: {Series!harmonic|(} {5}
IX: {Euler’s constant} {5}
IX: {Series!harmonic|)} {5}
IX: {Series|)} {5}
The above lines should produce in other text file:
Euler’s constant: 4,5
Series: 2-5
arithmetic: 4-5
geometric: 4
harmonic: 5
"|(" characters at the beginning of a string represent the start of a range, ")|" means end of a range, and "!" means subindex.
We have to use a binary search tree to accomplish this task, and I have written my Binary Search Tree class, but I have no idea how to go about writing the code for this task. Could someone guide me in the right direction as to how I should be thinking about using a tree for this task? So far, all I can do is parse the file in order to get out whatever is in the middle of the curly brackets and save those to a list. Thanks in advance.