15,036,363 members
See more:
I was looking for some text to help me calculate time complexity of programs for the questions generally asked in interviews and aptitude tests. Can someone please suggest some good book or website or article for the same?
Thank You
Posted
Ron Beyer 16-Dec-13 1:07am

Can you explain what "time complexity of programs" is?
DaveAuld 16-Dec-13 1:37am

http://en.wikipedia.org/wiki/Time_complexity
Ron Beyer 16-Dec-13 9:18am

I understand Big O, I guess his question didn't strike me as asking about big O so much as a method for programmatically calculating it.
Stefan_Lang 17-Dec-13 3:56am

Then he should have asked about measuring program performance, not time complexity. He also mentioned about being asked about it in interviews - just how often do you measure program performance in an interview?
Foryinath 14-Jul-15 8:45am

Were you looking for a big O or something else like me?
Your question is a bit ambiguous and I found it while I was searching for an answer to my problem.

You see I was looking for a way how I could calculate an approximate time that would be needed to solve some coding test for an interview based on the provided solution for that test.
For example if you check out these C++ programming tests for interviews you'll notice that writing a solution that detects if a word is an anagram should take less than 15 min and writing a solution that detects if a sentence is a palindrome should take less than 20 min.

In case anyone is looking for this as well I would like to mention that I found a very useful resources by searching for "evidence-based scheduling".

## Solution 1

You could always have a read of the wiki article on the subject.

http://en.wikipedia.org/wiki/Time_complexity[^]
Ron Beyer 16-Dec-13 10:39am

+5 for seeing through what I couldn't :) Big-O notation has its places in examining the efficiency of certain algorithms or chunks of code, but using it to evaluate a program as a whole, especially when you get into multi-threaded applications gets less and less applicable to how long it actually takes something to execute...
DaveAuld 16-Dec-13 10:45am

It only lodged in my brain because I did it in 2011 as part of my degree.. Surprised it hasn't been pushed out by something else by now :-)