How To Efficiently Retrieve The Last N Subdocuments In Mongodb Using C