To implement the following algorithm using balance(height) search tree,each operation should take O(logn) time.(n is the number of elements in the queue,
described later)
1)You have a set of programs that r to be run in an O.S.
say P_1,P_2,P_3,......,P_n.
each program has a memory requirement m_1 ...
Search found 8 matches
- Thu Oct 07, 2004 7:25 pm
- Forum: Algorithms
- Topic: Using Balanced search tree..any answer?8)
- Replies: 0
- Views: 931
- Wed Sep 29, 2004 8:03 pm
- Forum: Volume 2 (200-299)
- Topic: 264 - Count on Cantor
- Replies: 47
- Views: 22464
Prob 264
Hey,
Can nbody who got any AC give me some output he got for numbers around 10^7. or may be 10 outputs from 10^7 - 1 to 10^7. :)
Well my C++ basics r also not strong in certain cases so plz could you tell me
"The input list contains a single number per line and will be terminated by end-of-file ...
Can nbody who got any AC give me some output he got for numbers around 10^7. or may be 10 outputs from 10^7 - 1 to 10^7. :)
Well my C++ basics r also not strong in certain cases so plz could you tell me
"The input list contains a single number per line and will be terminated by end-of-file ...
- Sun Sep 26, 2004 9:46 pm
- Forum: Algorithms
- Topic: how to compute composite of 2 polynomials
- Replies: 2
- Views: 1190
- Sun Sep 26, 2004 4:43 pm
- Forum: Algorithms
- Topic: how to compute composite of 2 polynomials
- Replies: 2
- Views: 1190
how to compute composite of 2 polynomials
can any body give an algorithm to compute the composite of 2 polynomials,
for e.g p(x)=x^2 +1
q(x)=x^2
=> p(q(x))=x^4 + 1.
(2) p(x)=x^2 - x + 4
q(x)=x^4 - x^2
p(q(x))=x^8 - 2*x^6 + x^2 + 4.
)
for e.g p(x)=x^2 +1
q(x)=x^2
=> p(q(x))=x^4 + 1.
(2) p(x)=x^2 - x + 4
q(x)=x^4 - x^2
p(q(x))=x^8 - 2*x^6 + x^2 + 4.

- Sun Sep 26, 2004 9:13 am
- Forum: Volume 1 (100-199)
- Topic: 147 - Dollars
- Replies: 233
- Views: 51004
- Sun Sep 26, 2004 6:33 am
- Forum: Volume 1 (100-199)
- Topic: 147 - Dollars
- Replies: 233
- Views: 51004
help with 147!
hi
Plz tell me what is the logic that is wrong orwhat cases am i missing for the prob 147 ,here is my code: :(
#include<iostream>
using namespace std;
int a[]={10000,5000,2000,1000,500,200,100,50,20,10,5};
int dollars(int i,int n)
{
int chng=0;
if(i<11&&n>0)
{
if(n%a[i]==0)
{
chng ...
Plz tell me what is the logic that is wrong orwhat cases am i missing for the prob 147 ,here is my code: :(
#include<iostream>
using namespace std;
int a[]={10000,5000,2000,1000,500,200,100,50,20,10,5};
int dollars(int i,int n)
{
int chng=0;
if(i<11&&n>0)
{
if(n%a[i]==0)
{
chng ...
- Fri Sep 24, 2004 9:34 pm
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45232
- Fri Sep 24, 2004 8:56 am
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45232