Derive T(n) for the hash function based on the code you wrote. This is your homework and the goal is to learn complexity analysis. If you won't make an effort to derive T(n), I don't know how you expect to learn.
I can't be of any more help until you make this effort.
17 Replies - 1150 Views - Last Post: 02 February 2015 - 11:50 AM
#17
Re: Algorithm complexity - remove and insert
Posted 02 February 2015 - 11:48 AM
what is Derive?
like this? T(n)=n+m
n = number of times the loop in the hash function
m the number of linked list
like this? T(n)=n+m
n = number of times the loop in the hash function
m the number of linked list
#18
Re: Algorithm complexity - remove and insert
Posted 02 February 2015 - 11:50 AM
No... The function T(n) gives you a function for the number of steps the insert() method should take, where n is the size of the input parameter (the String you are adding to the hash table).
Not to be rude- but if you're doing complexity analysis, I am assuming you know something about complexity. Where are your course notes and book?
In looking at this thread, it really seems like you're waiting for me (or someone else) to do the work for you. So I'm going to close this thread. If you are really clueless on this subject, you should either see your professor in office hours or consider dropping the class.
Not to be rude- but if you're doing complexity analysis, I am assuming you know something about complexity. Where are your course notes and book?
In looking at this thread, it really seems like you're waiting for me (or someone else) to do the work for you. So I'm going to close this thread. If you are really clueless on this subject, you should either see your professor in office hours or consider dropping the class.

New Topic/Question
This topic is locked






MultiQuote

|