Fix algorithm

Job ID: 35298224

Budget: $10 – $30 USD

Fix code algorithm to use memory of the previous allocation instead of 0/1 allocation
Related categories: Algorithm C++ Programming