Thursday, March 1, 2012

My First Data Structure Exam

Anyone who has completed their sophomore year in Computer Science should have learned about Time and Space complexity of algorithms. It is one of the most fundamental concepts in Computer Science.  I had a subject called 'Data Structures' for my Bachelors degree and there was a question like this for the 1st class test. "Explain time and space complexity of algorithms.".
And, this was my answer.
"Whenever a programmer writes programs, if he tries to reduce the time taken for execution of a program, then the space required would increase. If he tries to reduce the space required, then the time required would increase. So a programmer is confused as what to chose. This complex situation is called space and time complexity". - and I also wrote a couple of examples as well.
I was particularly proud after the exam as I was able to 'answer' that question even without reading any text book.  It was only after a long time I actually learned about space and time complexity. (the Big-Oh notation etc)

How smart!!

1 comment:

  1. Hey is this the same test where we lost marks for the big oh question because actually it was Theta and we all read it as Big Oh !! .. O OOhhhh!