CommonLounge is a community of learners who learn together. Get started with the featured resources above, ask questions and discuss related stuff with everyone.
Quiz: Analyzing code complexity, estimating runtime and memory usage
The quiz consists of 5 sets of questions, each set consisting of 2-7 questions. Each question set starts off with a piece of code, and then you are asked several questions about the codes runtime and memory complexity. Enjoy!
Nice. I made a few silly mistakes along the way. There was one question regarding memory complexity that I didnt quite understand. It would help if it the explanation was elaborated a little bit. Overall, this was one heck of an exercise. Loved it.
Update: Some questions in this quiz have images that aren't loading at the moment. Please do not proceed with this quiz — we will remove this once it's been fixed. Sorry about this!
Recursion is a fundamental technique common in mathematics and computer science. If you don't have a background or you feel yours is week then check this out: Introduction To Recursion
We will be providing quizzes on recursion, this is our first one. Get yourself started and try it. Quizzes difficulty will start from focusing on simple recursive functions ending with complex functions so by finishing our quizzes it's pretty likely that you will be ready to start leaning Dynamic Programming and writing Backtracking solutions.
This quiz has about 20 questions which are fairly challenging, so make sure you have some time on your hands when you start. Should take you about 40-60 minutes to do this quiz. Also, keep a paper pen handy - you'll want to scribble for some of the questions!