Akuna Capital C++ Object Pool Coding Challenge Interview
Interview Experience
I learned C++ OOP two years ago, and I've almost forgotten everything, haha. They gave me an object pool class, did most of the work, and then I had to complete a function and fix a bunch of really st
Full Details
I learned C++ OOP two years ago, and I've almost forgotten everything, haha. They gave me an object pool class, did most of the work, and then I had to complete a function and fix a bunch of really stupid bugs—literally really stupid, because it explicitly stated that it couldn't be compiled yet and I had to debug. It had 45 minutes, and I didn't finish. I highly recommend thoroughly reviewing OOP and C++ syntax. The object pool has two private structs: template ObjectT struct node{ ObjectT object; node next} struct Batches{ Batches next; Node nodes; size_t size;} Node allocateBatch(size_t batchsize) Node& getnode() size_t capacity batches* batch (I don't quite remember this one) public: Several APIs capacity() You need to write numAllocated() Then there are a bunch of functions, the ultimate goal of which is to implement numAllocated().