KayS Posted July 16, 2014 Posted July 16, 2014 Hi, everyone the year has ended I finished my 2nd year at University. I was just going over my Subject Knowledge by doing quizzes, practice tests etc on my University site. However, there servers are messed up so I cant download the mark scheme and I don't know if my answers are correct so I'm going to post the question up and give my reasoning behind my answer and you could tell if I'm correct and what the correct answer would be. I have chosen C as the answer as when you give n = 100 it returns the lowest interger meaning that the less amount of data that needs to be processed by the algorithm meaning its would be the fastes. Please let me know if you agree
Greg H. Posted July 16, 2014 Posted July 16, 2014 I would try them with a number significantly larger than 100 and see what kind of results you get.
KayS Posted July 16, 2014 Author Posted July 16, 2014 sorry i meant to write 1000 and it seems to be that C is the best would you agree? because C 13*1000 +62 whereas D 1000(2) ... C returns a lower interger meaning it would be more efficent to process
mooeypoo Posted July 16, 2014 Posted July 16, 2014 Hi, everyone the year has ended I finished my 2nd year at University. I was just going over my Subject Knowledge by doing quizzes, practice tests etc on my University site. However, there servers are messed up so I cant download the mark scheme and I don't know if my answers are correct so I'm going to post the question up and give my reasoning behind my answer and you could tell if I'm correct and what the correct answer would be. I have chosen C as the answer as when you give n = 100 it returns the lowest interger meaning that the less amount of data that needs to be processed by the algorithm meaning its would be the fastes. Please let me know if you agree You can go with process of elimination. n^2 + anything is bigger than n^2, so S1 is bigger than S4 for sure S4 is also bigger, than S3 (n^2 > n) So, it's between S3 and S2. The simplest way is to plug in bigger and bigger numbers; 1000 and 10000 just to see which is bigger. A more educational approach would be to look at how the graphs of n^2, logn and nlogn look like. You can see here for a chart (and a generally good Big-O "cheat sheet" site) http://bigocheatsheet.com/#chart
KayS Posted July 16, 2014 Author Posted July 16, 2014 (edited) thank you very good explanation..my answer was right then =], I also did process of elimination can anyone help me out with this question? http://www.scienceforums.net/topic/84412-converting-analogue-audio-signal-to-digital/ Edited July 16, 2014 by KayS
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now