2 votes

pset5 speller how to only use 7.4 kb memory?

You don't have to use the heap (dynamic allocation) nor the stack (local variables) to store the dictionary. You can declare a static data structure as global and house the dictionary in it. For ...
user avatar
2 votes
Accepted

pset5 speller how to only use 7.4 kb memory?

It depends on the metrics used, I think those are heap and stack memory. Global variables don't show up in those statistics. Now if you can estimate an upper limit for the size of the dictionary...
user avatar
  • 20.7k
2 votes
Accepted

Variable optimized out eventhough it will be used later

This is a bug in clang, which has been fixed in version 3.5. The CS50 team is working on getting an update out with update50.
user avatar
  • 425

Only top scored, non community-wiki answers of a minimum length are eligible