Re: time complexity
- From: Mike Robson <robson@xxxxxxxxxxxxxx>
- Date: 27 Jun 2005 13:09:43 GMT
On 2005-06-27, gauravbjain@xxxxxxxxx <gauravbjain@xxxxxxxxx> wrote:
> Consider this...
>
> int h = n;
> int i;
>
> while ( h > 0 )
> {
> for(i=0;i<h;i++)
> {
> printf("%d",i);
> }
> h =/ 2;
> }
>
> What should be the complexity of this peice of code...
>
> Regards,
> Gaurav
>
The same complexity as an easy piece of homework.
.
- Follow-Ups:
- Re: time complexity
- From: gauravbjain
- Re: time complexity
- References:
- time complexity
- From: gauravbjain
- time complexity
- Prev by Date: time complexity
- Next by Date: Re: fsa: compleixity and frequency
- Previous by thread: time complexity
- Next by thread: Re: time complexity
- Index(es):
Relevant Pages
|