Construct an optimal binary search tree for 4 keys with $p_1 = 0.1$, $p_2 = 0.4$, $p_3 = 0.2$, $p_4 = 0.3$ using dynamic programming. Show the tables as well.
What really confuses me is how keys are ordered in this example? I have encountered with alphabetical ordering or similar to that, but this instance does not explicitly mention what are the keys so that we could compare them? Moreover, how the tables are constructed if one uses Dynamic Programming?