issues
search
leesugil
/
symbolic
Symbolic calculator for arithmetic operations with fractions
GNU General Public License v3.0
1
stars
0
forks
source link
Should I use hashtabs instead of binary trees for symbols?
#1
Closed
leesugil
closed
8 months ago
leesugil
commented
8 months ago
Binary Tree
Pros
No hard-coded limit of variables as long as hardware supports.
Can sort variables easily when displaying.
Cons
When comparing two trees node-wise, it could be expensive. -> Define a look-up function of a given tree?
Hashtab
Pros
Comparing two trees node-wise is linear.
Cons
Pre-defined limited number of variables. -> Do we ever need tens of thousands of symbolic variables in practice?
leesugil
commented
8 months ago
lookUpTree added without changing the binary tree structure.