Use jagged array
Store active & previous indexes
Only use two arrays in E at a time
Add comments
Use Tuple instead of DpTableEntry