Reverted heap test solution