using new for each node and value, combined with virtual dispatch tends to be a c++ anti-pattern. It looks like you are writing other languages in C++ syntax, motivated by promises of speed. The actual benefits of C++ come when you approach problems differently. This is a case where more exposure to C helps you avoid all the Java isms. Things to consider: - can you allocate memory for the whole system? - can you make…
[deleted]