Hey All
What are the most efficient ways of taking
1. int to string
2. string to int
3. string addtion
4. string multiplication
How To
Moderator: Board moderators
-
- New poster
- Posts: 14
- Joined: Fri Jul 05, 2002 7:04 pm
- Location: Bangladesh
- Contact:
Try algorithm thread
Hi,
Why don't you try the algorithm thread and see the post on BigInteger. I think this may help you. If you want to implement one of your own, see D.E.Knuth TAOCP, Volume2 Seminumerical Algorithm.
Bye.
- Suman
Why don't you try the algorithm thread and see the post on BigInteger. I think this may help you. If you want to implement one of your own, see D.E.Knuth TAOCP, Volume2 Seminumerical Algorithm.
Bye.
- Suman
-
- Experienced poster
- Posts: 202
- Joined: Fri Mar 22, 2002 2:00 am
- Location: Chittagong. CSE - CUET
- Contact:
Hi! Suman & Rajib!
Suman your class implementation is good but as Rajib has sended it in C thread so you may think that he needs the functions which is supported by C only, not C++.
Besides your class is too big for real time contests isn't it?
Rajib,
If you are familiar with C++ class routines you may try with his class which is really good as a "Class"!!!

Besides your class is too big for real time contests isn't it?
Rajib,
If you are familiar with C++ class routines you may try with his class which is really good as a "Class"!!!


Some URL
Hi,
You are right moni the code is BIG, but if one understand the whole thing then its easy to chop the unwanted portion of the code during the contest. And sorry to rajib if I bothered you indicating the `thing'. However here is a url where you will get some very good implemntation of big number, both in C & C++.
http://www.mirrors.wiretapped.net/secur ... aries/math
An also try searching in http://www.sourceplanet.com
Good luck.
- Suman
You are right moni the code is BIG, but if one understand the whole thing then its easy to chop the unwanted portion of the code during the contest. And sorry to rajib if I bothered you indicating the `thing'. However here is a url where you will get some very good implemntation of big number, both in C & C++.
http://www.mirrors.wiretapped.net/secur ... aries/math
An also try searching in http://www.sourceplanet.com
Good luck.
- Suman