Groups
Groups
Sign in
Groups
Groups
Design and Analysis of Algorithms
Conversations
About
Send feedback
Help
Need help finding running time of algorithm
0 views
Skip to first unread message
Crystal A.
unread,
Dec 11, 2010, 2:35:09 PM
12/11/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Design and Analysis of Algorithms
Hi guys, do any of you have the solution to this problem?
COMP 3000 April/May 2008
Q2. e) (i) Give the order of the running time in terms of n...
read(n);
w=0;
a=1;
while (a<=n){
for (b=1; b<=a; b++) w++;
a= a*2;
}
emacs ray
unread,
Dec 26, 2010, 7:00:10 PM
12/26/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Design and Analysis of Algorithms
w is finally 1+2+4+...=Θ(n)
Reply all
Reply to author
Forward
0 new messages