Upload the version using min heap

Upload the version using min heap