This has been a topic of debate for plenty and inspite of advancement in modern science nothing conclusive/flawfree yet has been produced to explain how the ancient Egyptians managed to build these ancient wonders.
Probably both, I'll stick with the Egyptians though. I remember researching ancient history and humans made a lot of things that we wouldn't think they really made at the time.