Re: [algogeeks] Re: Queue problem

2012-07-24 Thread Priyanka Raju
The answer is single queue... If we fill the queue fully and then dequeue and try again to enqueue... We will get the error.. This is because when we dequeue,we move the front pointer of the queue but not the rear pointer.. But enqueue is at rear end.. The condition for enqueue also checks the

Re: [algogeeks] Re: adobe written round que

2011-09-17 Thread priyanka raju
* * *#include fstream #include iostream using namespace std; bool flag=false; void check(int i) { int sum=0; char n[5]; itoa(i,n,10); for(int j=0;j5 n[j] != '\0';j++) { char p = n[j]; sum += atoi(p); } if(sum==3 || sum==6 || sum==9) flag = true; else if(sum9) check(sum); } void main() { int i;

Re: [algogeeks] Re: C Trick

2011-08-24 Thread priyanka raju
int a,b,max,min; max=(a+b+abs(a-b))/2; min=(a+b-abs(a-b))/2; -- cheers priyanka -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] C Trick

2011-08-24 Thread priyanka raju
It will work... a=3 b=-2 max=(a+b+abs(a-b))/2 so max=(3-2+abs(3-(-2)))/2 =(1+abs(5))/2 =(1+5)/2 =3 Same in case of min -- cheers priyanka -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

Re: [algogeeks] Front/end operations

2011-08-01 Thread priyanka raju
wat about a double ended queue? cheers priyanka -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] Re: FB intern

2011-07-31 Thread priyanka raju
tats bcos... if it is a^21... it will be (a^21/2)*(a^21/2)*(a^21mod2) = (a^10)*(a^10)*(a^1) correct me if i'm wrong -- cheers priyanka -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks]

2011-07-31 Thread priyanka raju
write a c program to print the following * * * * * * * * * -- cheers priyanka -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To