[algogeeks] can anyone tell me

2012-06-28 Thread Rahul verma
can anyone tell me how to prepare OS subject for placement and interview

which type of question interviewer will ask?

which website will i prefer ?

plzzz tell me ...

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] c prog problem

2012-06-13 Thread Rahul verma
int main()
{
 int i;
 float a=5.2;
char *ptr;
ptr=(char *)&a;
   for(i=0;i<=3;i++)
  printf("%d ",*ptr++);
  return 0;
}
give me explanation of this code.

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C QUESTION???

2012-01-10 Thread Rahul Verma
thanks for the info

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/E1c87OjP6LAJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] c output ??

2012-01-10 Thread Rahul Verma
@amol this is not the behaviour of printf, its totally about the typecasting

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/GPVlt15S3V0J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Database Classes

2011-10-08 Thread Rahul Verma
You are welcome.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/WJz0FGP5wUgJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Database Classes

2011-10-08 Thread Rahul Verma
Hi friends,

Sorry for this off topic, but I found that it would be interesting for us 
that now we have online classes of Databases from Stannford.db-class.org

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/zpcbKJ1elvMJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: best way to learn data structure

2011-10-04 Thread Rahul Verma
Hey Raghav,
 
No methods are worst or best.
 
Just go through any book you have and try the atleast 5 or 6 problems of 
various difficulty level based on that data structure.
 
Try to think about the functionality of the data structure, so that you can 
implement it in various situations or use it in different ways.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/1V_bOqlY3T0J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] New Group For Practicing and Learning Efficient Ways of Coding

2011-10-03 Thread Rahul Verma
Hey,
 
I have a suggestion that why we don't have a discussion on some topic for 
full one week and after that we can discuss problems from various 
programming sites and discuss the best solution of the problems..

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/S3FSxSWlnJAJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] New Group For Practicing and Learning Efficient Ways of Coding

2011-10-03 Thread Rahul Verma
@shady

we need moderators to stop spamming and to restrict the no. of problems

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/gArbDhccZG8J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: zigzag matrix

2011-10-03 Thread Rahul Verma
@Hatta 

Thanks a lot dear.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/jCx1kM6n4RwJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: zigzag matrix

2011-10-03 Thread Rahul Verma
we can achieve the zigzag form of the matrix by performing below steps:

int i=1,j=1;

For(i=0;i=n && i<=m) j increases upto value of m

Elseif(i>m) j increases upto value of n+m-i. 

}


*For e.g*

*for a 4X6 matrix*

*Input:*

1 2 3 4 5 6 

7 8 9 10 11 12

13 14 15 16 17 18

19 20 21 22 23 24

*Output:*

1

7 2

13 8 3

19 14 9 4 

20 15 10 5

21 16 11 6

22 17 12

23 18

24

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/_j3lxnLAnzQJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: zigzag matrix

2011-10-03 Thread Rahul Verma
@Anika
 
What do you mean with the zigzag fashion here in problem?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/5rO1BmBFlZwJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: string compress/expand

2011-10-02 Thread Rahul Verma
@rahul sharma
 
for that you have to check that string is alphanumeric or not. if it is 
alphanumeric then you have to call the function exapansion else you have to 
call the compression function.
 
and
 
if the desired output for *abc *is *a1b1c1* then you have to call the 
*exapnsion 
function* or if the desired output is *abc* then you have to add a feature 
in the *compression function* i.e. in output the string have to omit the 1's 

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/8olzJ_YJVWMJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: string compress/expand

2011-10-02 Thread Rahul Verma
@Rahul 
 
Parse the string and check the next element of the array if it is exactly 
the previous one then *increase the counter by 1* else no need to increase 
the counter.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/M08JxV-GeAsJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: hash

2011-09-17 Thread Rahul Verma
Is there any function or template is available in C++ STL for the Has 
Function?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/q5NgwJPaAFMJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Amazon Interview Question

2011-09-16 Thread Rahul Verma
@Ravi

+1

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/E0NIFwY150EJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: yahoo campus placements

2011-09-16 Thread Rahul Verma
Check the link: http://www.careercup.com/page?pid=yahoo-interview-questions

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/2N_Nig__1foJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Amazon Interview Question

2011-09-16 Thread Rahul Verma
How much space does a pointer and integer takes?
For eg :-
int a;
int *a;

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/RmPHywrTUbkJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: royal bank of scotland

2011-09-16 Thread Rahul Verma
Opportunities for the experienced candidates.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/y6n4Hd9fqTQJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Amazon First round

2011-09-03 Thread Rahul Verma
Hi Guys,

If anyone of you had given amazon first round telephonic interview in the last 
one month for SDE Role

Please reply back with the questions they asked

Help me guys.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/ScDu0xV45pEJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Book Request <>

2011-09-03 Thread Rahul Verma
download the book from: 
http://www.scribd.com/doc/50658450/Data-Structures-and-Algorithms-Made-Easy-For-Interviews-Programming-Interview-Questions

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/_ps7Ei5Tf74J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Hash Table

2011-09-02 Thread Rahul Verma
I am facing some difficulty in the implementation of Hash Table. Anyone can 
please share the good resources for Hash Table?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/DmcDxyNXfwEJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Amazon Interview

2011-09-02 Thread Rahul Verma
Hi friends,

Is there anyone who given the first telephonic round of Amazon recently. 
Please share the details with us.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/FVYRU6rdxH0J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: How to find median of 2 sorted arrays of different length

2011-09-01 Thread Rahul Verma
@jay could you please explain that how you know that the complexity is 
log(sizeA + sizeB). 

If you don't mind then could you please explain it in detail.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/YHMj8hRnKS4J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: How to find median of 2 sorted arrays of different length

2011-09-01 Thread Rahul Verma
how we find the median, if we don't have sufficient memory to merge them.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/ePBMAl0aP4cJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] 2 Binary trees are isomorphic?

2011-08-27 Thread Rahul Verma
@raghavan  i also think the same.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/gV3RWQxu0gEJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] SPOJ Problem DIVSUM

2011-08-27 Thread Rahul Verma
@gaurav Thanks dear

Could you please explain the algorithm.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/TNa8UygkzGkJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] SPOJ Problem DIVSUM

2011-08-27 Thread Rahul Verma
I am trying to submit solution for the SPOJ 
DIVSUMproblem, but it returns the 
*time limit exceeded*. Code submitted by me is below:


#include 
#include 

using namespace std;

int proper_divisor(int number);
int main()
{
int test,i,number;
cin>>test;
for(i=0; i>number;
proper_divisor(number);
}
}
int proper_divisor(int number)
{
int i,n=0;
for(i=1; ihttps://groups.google.com/d/msg/algogeeks/-/vld8Fghb1twJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] unsorted array problem

2011-08-26 Thread Rahul Verma
@Umesh I really appreciate your solution and thinking to understand the 
complexity of the program.

Actually I don't have that much idea about the "*how to calculate complexity 
of any program*". So could you please show some light on the evaluation 
procedure of complexity.

Rahul Verma

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/Lw-yo4fG0kgJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] apti!

2011-08-26 Thread Rahul Verma
@yanan how it is 20.

Rahul Verma

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/uIONcvrf6kUJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] SPOJ Problem

2011-08-25 Thread Rahul Verma
Hi everybody,

I am trying to solve the below mentioned SPOJ problem. I am not getting that
how it returns *11 56 *in 3rd test.

SPOJ Problem: http://www.spoj.pl/problems/CMPLS/

Sincerely,
Rahul Verma

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Anyone have "The google resume book"

2011-08-25 Thread Rahul Verma
link is not working guys

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/jvN-OwGX4KAJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Spoj Problem : Small Factorials

2011-02-04 Thread Rahul Verma
Thanx to all @above.

I got the result ACC.

On Feb 5, 12:45 am, sunny agrawal  wrote:
> http://www.codechef.com/wiki/tutorial-small-factorials
>
>
>
>
>
>
>
>
>
> On Fri, Feb 4, 2011 at 11:52 PM, Dave  wrote:
> > Oh. That is supposed to be t. So the line actually could read
> >        t /= 1;
> > Sorry for the typo.
>
> > Dave
>
> > On Feb 4, 11:58 am, Rahul Verma  wrote:
> > > @Dave
> > > In the line t=p/100;
> > > what is the value of p here or what it means?
>
> > > On Feb 4, 9:57 pm, Dave  wrote:
>
> > > > @Rahul: Given that 100! < 100^100 = 10^200, we know that 100! has less
> > > > than 200 digits. Assuming 32-bit integers, we might choose to store
> > > > anywhere from 1 to 7 digits in an integer, realizing that we have to
> > > > multiply the integer by a number up to 100 and still want the result
> > > > to be less than 2^31. I'll use 5 digits in an integer. Then the
> > > > computation can look something like this, assuming that you have
> > > > already read n, the number whose factorial you want:
>
> > > >     int a[40], i, j, l, t;
> > > >     a[0] = 1; // rightmost "digit" of number = 0!
> > > >     l = 1;    // the active number of elements of a[] used.
> > > >     for( i = 2 ; i < n ; ++i )
> > > >     {
> > > >         t = 0; // the carry into the next product
> > > >         for( j = 0 ; j < l ; ++j )
> > > >         {
> > > >             t += i * a[j];    // multiply digit by i and add carry
> > > >             a[j] = t % 1; // extract 5 digits
> > > >             t = p / 10;   // calculate next carry
> > > >         }
> > > >         if( t > 0 ) // does the number need to add a digit?
> > > >             a[l++] = t;
> > > >     }
> > > >     printf("%i",a[l-1]);
> > > >     for( i = l-2 ; i >= 0 ; --i )
> > > >         printf("%.5i",a[i]);
> > > >     printf("\n");
>
> > > > Dave
>
> > > > On Feb 4, 10:19 am, Rahul Verma  wrote:
>
> > > > > Hi Group,
>
> > > > > Let me help to solve this problem of SPOJhttps://
> >www.spoj.pl/problems/FCTRL2/
>
> > > > > The approach to solve the problem is very easy and I'm confused that
> > > > > how to store such a large no. like 100! in a variable using C++
> > > > > Language.
>
> > > > > Thanx & Regards,
> > > > > Rahul Verma- Hide quoted text -
>
> > > - Show quoted text -
>
> > --
> > 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
> > algogeeks+unsubscr...@googlegroups.com > .com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.
>
> --
> Sunny Aggrawal
> B-Tech IV year,CSI
> Indian Institute Of Technology,Roorkee

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: BISHOPS

2011-02-04 Thread Rahul Verma
@king
Can you pls told me that wat would be the position at where bishops
might place in the 2X2, 3X3, 4X4 chessboard.

On Feb 4, 8:39 pm, subramania jeeva  wrote:
> Use python for arithmetic operation of large numbers.. :)
>
> Cheers
>           ~ Jeeva ~
>
>
>
>
>
>
>
> On Fri, Feb 4, 2011 at 8:32 PM, Manmeet Singh  wrote:
> > C/C++ user : Take input in a char array or string(if using C++) : a
> > now do string addition. : a = a + a;
> > now do string substraction. : a = a - 2.
>
> > Java user : Use BigInt class
>
> > On Fri, Feb 4, 2011 at 8:12 PM, Logic King 
> > wrote:
>
> >> please help me solve the problem on SPOJ
>
> >>https://www.spoj.pl/problems/BISHOPS/
>
> >> The logic of the problem is very easy i.e. 2*n-2
> >> but i am getting WA bcoz i am not able to deal with the large inputs.[?]
> >> plz help me how to get this AC.
>
> >> #include
> >> int main()
> >> {
> >>     long long int n,bmax;
> >>     while(scanf("%lld",&n)!=EOF)
> >>     {
> >>         if(n==1)
> >>         printf("%d\n",1);
> >>         else
> >>         {
> >>         bmax=(2*n)-2;
> >>         printf("%lld\n",bmax);
>
> >>         }
> >>     }
> >> return 0;
> >> }
>
> >> --
> >> 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
> >> algogeeks+unsubscr...@googlegroups.com >>  .com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/algogeeks?hl=en.
>
> >  --
> > 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
> > algogeeks+unsubscr...@googlegroups.com > .com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.
>
>
>
>  325.png
> < 1KViewDownload

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Spoj Problem : Small Factorials

2011-02-04 Thread Rahul Verma
@Dave
In the line t=p/100;
what is the value of p here or what it means?

On Feb 4, 9:57 pm, Dave  wrote:
> @Rahul: Given that 100! < 100^100 = 10^200, we know that 100! has less
> than 200 digits. Assuming 32-bit integers, we might choose to store
> anywhere from 1 to 7 digits in an integer, realizing that we have to
> multiply the integer by a number up to 100 and still want the result
> to be less than 2^31. I'll use 5 digits in an integer. Then the
> computation can look something like this, assuming that you have
> already read n, the number whose factorial you want:
>
>     int a[40], i, j, l, t;
>     a[0] = 1; // rightmost "digit" of number = 0!
>     l = 1;    // the active number of elements of a[] used.
>     for( i = 2 ; i < n ; ++i )
>     {
>         t = 0; // the carry into the next product
>         for( j = 0 ; j < l ; ++j )
>         {
>             t += i * a[j];    // multiply digit by i and add carry
>             a[j] = t % 1; // extract 5 digits
>             t = p / 10;   // calculate next carry
>         }
>         if( t > 0 ) // does the number need to add a digit?
>             a[l++] = t;
>     }
>     printf("%i",a[l-1]);
>     for( i = l-2 ; i >= 0 ; --i )
>         printf("%.5i",a[i]);
>     printf("\n");
>
> Dave
>
> On Feb 4, 10:19 am, Rahul Verma  wrote:
>
>
>
>
>
>
>
> > Hi Group,
>
> > Let me help to solve this problem of 
> > SPOJhttps://www.spoj.pl/problems/FCTRL2/
>
> > The approach to solve the problem is very easy and I'm confused that
> > how to store such a large no. like 100! in a variable using C++
> > Language.
>
> > Thanx & Regards,
> > Rahul Verma

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Spoj Problem : Small Factorials

2011-02-04 Thread Rahul Verma
@jeeva
Can you pls explain me in detail or some link to the tutorial of
string manipulation in C++.
I googled about it but most of the links are in Python & Javascript.

On Feb 4, 9:29 pm, subramania jeeva  wrote:
> Use string multiplication. :)
>
> Cheers
>           ~ Jeeva ~
>
> On Fri, Feb 4, 2011 at 9:49 PM, Rahul Verma wrote:
>
>
>
>
>
>
>
> > Hi Group,
>
> > Let me help to solve this problem of SPOJ
> >https://www.spoj.pl/problems/FCTRL2/
>
> > The approach to solve the problem is very easy and I'm confused that
> > how to store such a large no. like 100! in a variable using C++
> > Language.
>
> > Thanx & Regards,
> > Rahul Verma
>
> > --
> > 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
> > algogeeks+unsubscr...@googlegroups.com > .com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Spoj Problem : Small Factorials

2011-02-04 Thread Rahul Verma
Hi Group,

Let me help to solve this problem of SPOJ https://www.spoj.pl/problems/FCTRL2/

The approach to solve the problem is very easy and I'm confused that
how to store such a large no. like 100! in a variable using C++
Language.

Thanx & Regards,
Rahul Verma

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Doubly linklist to Singly linklist...........

2010-08-08 Thread Rahul Verma
XOR Linked list tutorial http://en.wikipedia.org/wiki/XOR_linked_list

On Aug 8, 11:49 am, Pramod Negi  wrote:
> Search XoR List on Wiki
>
> On Sun, Aug 8, 2010 at 10:19 AM, UMESH KUMAR wrote:
>
> > how to convert Doubly Link list to a Singly link list without changes
> > the Structure of the list if possible or not ,if possible then try to
> > discus of that problem.
>
> > thanks and Regards
> > Umesh kumar
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post to this group, send email to algoge...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.