Re: [algogeeks] Re: spoj NKTM

2011-06-15 Thread kartik sachan
without priority queue its .08 and with priority queue its .0.00 -- 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+unsubsc

Re: [algogeeks] Re: spoj NKTM

2011-06-15 Thread sunny agrawal
0.00 with priority_queue stl for me :) On Thu, Jun 16, 2011 at 10:55 AM, Kunal Yadav wrote: > Whats ur running time. Mine is 0.05 without using priority queque. > > > On Wed, Jun 15, 2011 at 8:24 PM, kartik sachan wrote: > >> ya dude finally i applied that algo only >> >> -- >> You received this

Re: [algogeeks] Re: spoj NKTM

2011-06-15 Thread Kunal Yadav
Whats ur running time. Mine is 0.05 without using priority queque. On Wed, Jun 15, 2011 at 8:24 PM, kartik sachan wrote: > ya dude finally i applied that algo only > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this grou

[algogeeks] How to use asm in spoj

2011-06-15 Thread saurabh singh
Hello I have been thinking if I can use asm in c programs to enhance my time... So to give it a try i tried http://www.spoj.pl/problems/STREETR/ with the following code: #include int gcd( int a, int b ) { int result ; __asm__ __volatile__ ( "movl %1, %%eax;" "movl

Re: [algogeeks] FIBONACCI problem.

2011-06-15 Thread saurabh singh
t,m;f(n){return n<=2?1:f(n-1)+f(n-2);} main(){scanf("%d",&t);while(t--)scanf("%d",&m)&&printf("%d\n",f(m+11)-f(m+1)+f(6+m)%10));} My best attempt with the c code..132 bytes still Now gonna try perlIt definitely requires exceptional skills to bring it down to 111 bytes but have this gut

Re: [algogeeks] Re: find output.

2011-06-15 Thread DIPANKAR DUTTA
It's ok.. char *p="hai friends"...not correct bcz you did allocate memory for that string but assiging poiter to the base address.. from where gcc will get the bse address of that string when u r not actually allocate memory for it? thus it generate SIGSEG signal and give invalid memory addre

[algogeeks] Re: find output.

2011-06-15 Thread DK
Gives me a SEGFAULT on gcc. Probably due to undefined behaviour. -- DK http://twitter.com/divyekapoor http://www.divye.in -- 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/

Re: [algogeeks] Sorting an array - using the foll functions

2011-06-15 Thread DK
Really really sorry for polluting this thread, but there's small issue in that analysis: The cost O(N) is in terms of reverse operations executed (that is swaps) and not in terms of the number of comparisons. The number of comparisons remain O(N log N) but the maximum number of swaps is O(N) whi

Re: [algogeeks] Sorting an array - using the foll functions

2011-06-15 Thread DK
Oops, there's a bug in my analysis! the sort complexity is even better at O(N) :) If you're doing K merges of subarrays of size O( N / K ) (which is the worst case for this algo due to the merge cost of O(min{N, M}) ) using the reverse operation you've supplied, the result is an O(N) sort inst

Re: [algogeeks] Sorting an array - using the foll functions

2011-06-15 Thread DK
On a closer look, you can clearly see that as per my approach to the problem, I have defined something similar to the swap(i, j) operator. Given this operator, you can implement any O(n log n) sort that you desire. swap(i, j) = reverse(i + 1, j), reverse(i, i + 1), reverse(i+1, j) Have fun imple

Re: [algogeeks] Sorting an array - using the foll functions

2011-06-15 Thread DK
Everyone here's mentioned O(n^2) Pancake sorting. Here's a solution in O(n log n) A run is defined as a sequence of consecutive values in the array. 1. Go through the array and reverse descending runs - O(n) as reverse(i, j) is supplied. Now you have an array with many runs in ascending order.

[algogeeks] find output.

2011-06-15 Thread amit the cool
main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); } -- 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 em

[algogeeks] FIBONACCI problem.

2011-06-15 Thread PRAMENDRA RATHi rathi
problem::: https://www.spoj.pl/problems/FIBSUM/ can anyone suggest idea to reduce my code to 111 byte..its currebt size is about 174 int a[50]={0},t,m; f(int n) { return a[n]=a[n]?a[n]:n<=2?1:f(n-1)+f(n-2); } main() { scanf("%d",&t); while(t--) { scanf("%d",&m) ; printf("%d\n",(f(m+11)-f(m+1)+f

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread DK
There are only 2 types of heaps in this problem: 1. Optional heaps -> have > 1 coins 2. Non-optional heaps -> have = 1 coins Start from the rightmost heap. This is base case - whoever gets this heap surely wins. Look at the heaps before it. If it is a non-optional heap (1 element only), then the

[algogeeks] Re: New moderators....

2011-06-15 Thread DK
+1 guys. The first thing you should do is send a warning mail to the Job spammers on the group and kick them out if they send another spam mail. :) Best of luck and keep the forum rocking! :) -- DK -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks

Re: [algogeeks] Re: is it correct??

2011-06-15 Thread DK
The behaviour of allowing the following code to compile: cin >> x; int a[x]; by gcc/g++ is due to historical reasons. This kind of a declaration is called a variable length array however it is not supported by the C++ and C standards. To prove that this is the case, recompile with g++ -pedant

[algogeeks] Java Developer Needed in MA -- F2F Required

2011-06-15 Thread Leon Parker
Hello Associate, Hope you are doing well! Please go through the below requirement and let me know if you have any Java Developer local to MA for the below position? Job Title: Java Developer Location: Cambridge, MA Duration: 3-6 Months Rate: $50 Gotta have 7 yrs Java, and strong Linux and SQL e

[algogeeks] Siebel Developer Needed in FL -- F2F required

2011-06-15 Thread Leon Parker
Hello Associate, Hope you are doing well! Please go through the below requirement and let me know if you have any Siebel Developer local to FL for the below position? Job Title: Siebel Developer Location: Jacksonville, FL Duration: 3 Months Rate: $50/hr Qualifications: We need three people who h

[algogeeks] Re: Need help

2011-06-15 Thread siva viknesh
code blocks On Jun 15, 9:05 pm, shashankreddy509 wrote: > Thanks alot > for the response. -- 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

Re: [algogeeks] [brain teaser 15 june ] Engineer Physicist Mathematician puzzle

2011-06-15 Thread Rohit Sindhu
@jeeva ... rather we can say that that the mathematician made a dot (circle of zero radius) and declared everything inside the circle (point) outside the fence :) On Wed, Jun 15, 2011 at 6:41 PM, subramania jeeva wrote: > The mathematician made a small fence around himself and declared hims

Re: [algogeeks] Re: Finding shortest path in 4-ary tree

2011-06-15 Thread sunny agrawal
@Raghavan if you want to fing the shortest path from a node u to v then its better to use BFS but according to your second post it seems you want to find path from root node to a leaf, in that case DFS seems to be best On Wed, Jun 15, 2011 at 9:56 PM, bittu wrote: > I think BFS will do That isn

[algogeeks] Re: Finding shortest path in 4-ary tree

2011-06-15 Thread bittu
I think BFS will do That isn't it.?? lets say we have starting node v & wants to find shortest path e.g leaf at lowest height say this node u so when you will do BFS each level will represent the shortest path between two nodes. shortest path=min dist(V,U) DS Used Queue Time Complexity O(N) Co

[algogeeks] Re: Need help

2011-06-15 Thread shashankreddy509
Thanks alot for the response. -- 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/-/302D7BLEHOAJ. To post to this group, send email to algogeeks@googlegroups.com.

[algogeeks] Re: Need help

2011-06-15 Thread Maksym Melnychok
EkoPath compiler has been open sourced recently: http://www.pathscale.com/ekopath-compiler-suite -- 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/-/j07rEcpBsq

Re: [algogeeks] Need help

2011-06-15 Thread shashankreddy509
i need compiler for windows 7... -- 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/-/Y9OZdeYwmggJ. To post to this group, send email to algogeeks@googlegroups.c

[algogeeks] Re: Sorting an array - using the foll functions

2011-06-15 Thread bittu
@ ross yes its pancake sorting,although i have code using insertion sort O(N^2) , we can use quick sort to achieve O(nlogn) click here http://shashank7s.blogspot.com/2011/03/pancake-sorting.html Feel Free to Comment Thanks Shashank CSE,BIT Mesra -- You received this message because you are subs

Re: [algogeeks] Need help

2011-06-15 Thread 李峰
intel icc compiler On Wed, Jun 15, 2011 at 08:20:39AM -0700, shashankreddy509 wrote: > can any one tell the best compiler for c and c++... > > > Thanks, > G. Shashank Reddy > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. >

Re: [algogeeks] Need help

2011-06-15 Thread D.N.Vishwakarma@IITR
In windows you can choose codeblocks or best is use linux gnu compiler On Wed, Jun 15, 2011 at 8:50 PM, shashankreddy509 < shashankreddy...@gmail.com> wrote: > can any one tell the best compiler for c and c++... > > > Thanks, > G. Shashank Reddy > > -- > You received this message because you are

[algogeeks] Need help

2011-06-15 Thread shashankreddy509
can any one tell the best compiler for c and c++... Thanks, G. Shashank Reddy -- 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/-/g2ZE6Sm9p-MJ. To post to thi

Re: [algogeeks] Re: spoj NKTM

2011-06-15 Thread kartik sachan
ya dude finally i applied that algo only -- 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. F

[algogeeks] Re: spoj NKTM

2011-06-15 Thread KK
This q increased my score by directly 3 points... and thats a huge one.. :D @ kartik - Do it by priorty queue for better efficiency.. -- 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.

Re: [algogeeks] Re: DE Shaw Q

2011-06-15 Thread romil bansal
i think it can be done by counting the no of starting heaps with 1 coins in it before any heap with coin>1 in it. if all the heaps have only one coin that player1 win if heap%2==1 if there is any heap with >1 then player1 win if (starting heap with 1 coin in them)%2==0. eg player 1 win in case 1 of

Re: [algogeeks] Re: DE Shaw Q

2011-06-15 Thread Srinivasa Rao
Lets say: Player1 picking first. x : number of continuous heaps which contains only one coin at the start. Ex. 1,2,3,1,4 (x = 1) 1,1,2,3 (x = 2) 2,1,3,4,5 ( x= 0) case 1: x is even ( Player1 wins) case 2: x is odd (Player2 wins) correct me if i am wrong On 15 June 2011 19:10, L wrote: > T

[algogeeks] Re: Finding total number of inversions in an array in O(nlogn) complexity .

2011-06-15 Thread KK
Thanks Harshal!! Actually changing juzz count from int to long long suffices -- 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 a

[algogeeks] Re: Explain the o/p

2011-06-15 Thread Maksym Melnychok
that's floating point for you. http://en.wikipedia.org/wiki/Floating_point -- 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/-/RcduUpABmi8J. To post to this gr

[algogeeks] Re: Explain the o/p

2011-06-15 Thread shashankreddy509
i have checked the code in broland 4.5.. i have changed some code and checked ... int main() { *float a=275.6;* printf("%.10f\n",a);//prints 275.7000122070 WHY??? if(275.7>a) printf("Hi"); else printf("Hello"); return 0; } output is 275.661035 and also look at this one as well.. int m

[algogeeks] Re: DE Shaw Q

2011-06-15 Thread L
The ordering of coins matter for this problem. For ex. 1 2 and 2 1 have different results. So, i don't think that there would be a direct formula for this problem. We will have to traverse all the heaps of coins determining whether the current player is in winning or losing position. On Jun 15, 6:

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread immanuel kingston
yep true. The difficult part is trying to find when Player 1 can win with heaps of size 1. Thanks, Immanuel On Wed, Jun 15, 2011 at 6:59 PM, sunny agrawal wrote: > i think solution depends on no of heaps having single coin > if there are even number of such heaps player 1 will win > if there ar

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread sunny agrawal
no that also wont work n=2 3,1 On Wed, Jun 15, 2011 at 6:59 PM, sunny agrawal wrote: > i think solution depends on no of heaps having single coin > if there are even number of such heaps player 1 will win > if there are odd number of such heaps player 2 will win > > > On Wed, Jun 15, 2011 at 6:49

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread sunny agrawal
i think solution depends on no of heaps having single coin if there are even number of such heaps player 1 will win if there are odd number of such heaps player 2 will win On Wed, Jun 15, 2011 at 6:49 PM, Nitish Garg wrote: > Player 1 can still win in this case: Player 1 can take 1 from the firs

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread Nitish Garg
Player 1 can still win in this case: Player 1 can take 1 from the first heap forcing Player 2 to take the remaining 1. Then Player 1 can take the 2 coins from the second heap and win. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread sunny agrawal
@Nitish n=2 heap 1 = 2 heap 2 = 3 Xor = 1 still player one can win :) On Wed, Jun 15, 2011 at 6:49 PM, sunny agrawal wrote: > @immanuel > ohh, i read the Question wrong. :( > i was thinking player1 is starting from least numbered heap and player 2 > from highest no heap > > > > On Wed, Jun 15,

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread immanuel kingston
@Nitish, I think it fails for this condition 4 heaps with 1,2,1,2 Player 1 starts first with picking 1 coin from heap 1 Player 2 picks 2 coins from heap 2 Player 1 picks 1 coin from heap 3 Player 2 picks 2 coins from heap 4. Player 2 wins but XOR of the number of coins in each heap is 0(if that

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread sunny agrawal
@immanuel ohh, i read the Question wrong. :( i was thinking player1 is starting from least numbered heap and player 2 from highest no heap On Wed, Jun 15, 2011 at 6:36 PM, immanuel kingston < kingston.imman...@gmail.com> wrote: > Player 1 will take 1 coin from heap 1 > Player 2 has to take th

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread Nitish Garg
I think that when the XOR of all the coins is zero Player 1 can always win. -- 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/-/EQtViYQFACMJ. To post to this gr

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread immanuel kingston
Player 1 will take 1 coin from heap 1 Player 2 has to take the other coin from heap1. Player 1 will take both the coins in heap 2. Thanks, Immanuel On Wed, Jun 15, 2011 at 6:33 PM, sunny agrawal wrote: > check out this case > n = 2 > both heaps having 2 coins > player 2 will win i think > > >

Re: [algogeeks] [brain teaser 15 june ] Engineer Physicist Mathematician puzzle

2011-06-15 Thread subramania jeeva
The mathematician made a small fence around himself and declared himself to be on the outside the fence... :-) Cheers ~ Jeeva ~ On Wed, Jun 15, 2011 at 5:40 PM, amit kumar wrote: > @anika jain: will u plz xplain?? > > > On Wed, Jun 15, 2011 at 4:02 PM, Anika Jain wrote: > >> ea

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread sunny agrawal
check out this case n = 2 both heaps having 2 coins player 2 will win i think On Wed, Jun 15, 2011 at 6:26 PM, immanuel kingston < kingston.imman...@gmail.com> wrote: > Yes. I am wrong. As per the example, Player 2 will win if he plays > efficiently. > > Let me put my solution this way, > > If al

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread immanuel kingston
Yes. I am wrong. As per the example, Player 2 will win if he plays efficiently. Let me put my solution this way, If all the the heaps are of size > 1 the Player 1 can win always. Thanks, Immanuel On Wed, Jun 15, 2011 at 5:36 PM, sunny agrawal wrote: > consider the case. > n = 2; > heap 1 -> no

Re: [algogeeks] MSFT Q

2011-06-15 Thread keyan karthi
we can even add word completion :) On Wed, Jun 15, 2011 at 5:25 PM, immanuel kingston < kingston.imman...@gmail.com> wrote: > Use a trie data structure and pre-load it with all the words of a > dictionary. > > Thanks, > Immanuel > > > > On Wed, Jun 15, 2011 at 3:06 PM, Piyush Sinha wrote: > >> *H

Re: [algogeeks] Adobe Q

2011-06-15 Thread immanuel kingston
The following is for LCA for 2 nodes in a n-ary tree. A more tougher problem is to find the LCA for n nodes in the same n-ary tree. Node * findLCA (Node *root, Node * l, Node * r, int n) { if (l == null || r == null) return root; if (root == null) return null; if (isChild(root,l) || i

Re: [algogeeks] [brain teaser 15 june ] Engineer Physicist Mathematician puzzle

2011-06-15 Thread amit kumar
@anika jain: will u plz xplain?? On Wed, Jun 15, 2011 at 4:02 PM, Anika Jain wrote: > earth is a sphere i.e consisiting of infinite circles.. so mathematician > had put the fence around that circle of the sphere where fence's length is > equal to the circle's perimeter. > > > On Wed, Jun 15, 201

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread sunny agrawal
consider the case. n = 2; heap 1 -> no of coins 1 heap 2 -> no of coins 2 On Wed, Jun 15, 2011 at 5:34 PM, sunny agrawal wrote: > i think u r wrong > what if heap size -1 is 0 > i think one should pick atleast one coin else game will draw > > > On Wed, Jun 15, 2011 at 5:17 PM, immanuel kingst

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread sunny agrawal
i think u r wrong what if heap size -1 is 0 i think one should pick atleast one coin else game will draw On Wed, Jun 15, 2011 at 5:17 PM, immanuel kingston < kingston.imman...@gmail.com> wrote: > First Player can always win. > > For each heap >Pick heap-size - 1 coins if this is not the n

Re: [algogeeks] MSFT Q

2011-06-15 Thread immanuel kingston
Use a trie data structure and pre-load it with all the words of a dictionary. Thanks, Immanuel On Wed, Jun 15, 2011 at 3:06 PM, Piyush Sinha wrote: > *How will you design a SpellChecker for an e-mail application?* > > > -- > *Piyush Sinha* > *IIIT, Allahabad* > *+91-8792136657* > *+91-748312272

Re: [algogeeks] DE Shaw Q

2011-06-15 Thread immanuel kingston
First Player can always win. For each heap Pick heap-size - 1 coins if this is not the n-1th heap Pick all coins from the heap if this the n-1th heap. Please correct me if i am wrong. Thanks, Immanuel On Wed, Jun 15, 2011 at 3:13 PM, Piyush Sinha wrote: > *There are n heaps of coin(numbe

[algogeeks] How to form a tree based on api which states the property of each node

2011-06-15 Thread Raghavan
There is a tree which denotes 4 directions, Node direction{ direction *side1,*side2,*side3,*side4; }; makeTree(){ direction *tree; getdirection(tree,1); getdirection(tree->right,2); getdirection(tree->left,1); /* how to form such a tree root side1 side2 side3 side4 side

Re: [algogeeks] [brain teaser 15 june ] Engineer Physicist Mathematician puzzle

2011-06-15 Thread Anika Jain
earth is a sphere i.e consisiting of infinite circles.. so mathematician had put the fence around that circle of the sphere where fence's length is equal to the circle's perimeter. On Wed, Jun 15, 2011 at 12:44 PM, Lavesh Rawat wrote: > Engineer Physicist Mathematician puzzle - 15 june * > * ***

Re: [algogeeks] Re: is it correct??

2011-06-15 Thread • » νιρυℓ « •
Its from stack. Using int a[n] the amount of memory that can be allocated is very small as compared to that in case of using malloc( heap allocation ). On Wed, Jun 15, 2011 at 2:45 PM, sunny agrawal wrote: > @kartik sachan > This function is *not* defined in ANSI-C and is *not* part of C++, but i

[algogeeks] help me wd the following problem

2011-06-15 Thread Ankit Sablok
Hello friends I am thinking of a combinatorics solution to this problem on spoj but cant come up wd a formula please suggest me some technique to solve this problem http://www.spoj.pl/problems/CHAIR/ -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks"

[algogeeks] DE Shaw Q

2011-06-15 Thread Piyush Sinha
*There are n heaps of coin(numbered from 0 to n-1) with atleast 1 coin in each heap. There are 2 players. First player can pick any no. of coins from the least numbered heap, then the second player can pick any no. of coins from the least numbered heap. Unless it is emptied, the player cant move on

[algogeeks] MSFT Q

2011-06-15 Thread Piyush Sinha
*How will you design a SpellChecker for an e-mail application?* -- *Piyush Sinha* *IIIT, Allahabad* *+91-8792136657* *+91-7483122727* *https://www.facebook.com/profile.php?id=10655377926 * -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group

[algogeeks] Adobe Q

2011-06-15 Thread Piyush Sinha
*A preorder of a complete binary tree is given , prints its level order* -- *Piyush Sinha* *IIIT, Allahabad* *+91-8792136657* *+91-7483122727* *https://www.facebook.com/profile.php?id=10655377926 * -- You received this message because you are subscribed to the Google Groups "Algorithm Geek

[algogeeks] Adobe Q

2011-06-15 Thread Piyush Sinha
WAP to find the LCA in a n-ary tree. -- *Piyush Sinha* *IIIT, Allahabad* *+91-8792136657* *+91-7483122727* *https://www.facebook.com/profile.php?id=10655377926 * -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, sen

[algogeeks] Re: FOR ALL INDIANS PLZ READ IT

2011-06-15 Thread T3rminal
Absolutely.. Personal comments should be completely banned. And its matter of shame for people who think that they are serving the nation by abusing others. On Jun 13, 5:29 pm, Umer Farooq wrote: > +1 > > I really like this group ... but sometimes people get rude and > show prejudice attitude to

Re: [algogeeks] Re: is it correct??

2011-06-15 Thread sunny agrawal
@kartik sachan This function is *not* defined in ANSI-C and is *not* part of C++, but is supported by some compilers. and +1 to Shachindra's post...i also think memory allocation will be from heap...not stack On Wed, Jun 15, 2011 at 2:34 PM, Shachindra A C wrote: > @vipul : dynamic memory al

[algogeeks] New moderators....

2011-06-15 Thread sharad kumar
hi guys, Regarding the issue of new moderators I have decided to make 1)wladimirufc 2)nishanth 3)siva viknesh as the new moderators..They will assist me to maintain the forum better. I hope they discharge their responsibility in maintaining the dignity of the forum... @all: Please assist them in

Re: [algogeeks] Re: is it correct??

2011-06-15 Thread Shachindra A C
@vipul : dynamic memory allocation from stack? are you sure? generally dynamic memory allocations are done from the heap right? On Wed, Jun 15, 2011 at 2:28 PM, kartik sachan wrote: > hey is itoa() is supported by g++ compliers??? > > -- > You received this message because you are subscribed to

Re: [algogeeks] Re: is it correct??

2011-06-15 Thread kartik sachan
hey is itoa() is supported by g++ compliers??? -- 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.

[algogeeks] Explain the o/p

2011-06-15 Thread Nishant Mittal
//Prog 1 #include int main() { float a=75.7; printf("%.10f\n",a); //prints 75.669482 if(75.7>a) printf("Hi"); else printf("Hello"); return 0; } //Prog 2 #include int main() { float a=275.7; printf("%.10f\n",a);//prints 275.7000122070 *WHY???* if(275.7>a) printf("Hi"); else prin

Re: [algogeeks] Re: Finding total number of inversions in an array in O(nlogn) complexity .

2011-06-15 Thread Harshal
AC: #include #include #include #include using namespace std; void MergeSort(vector& v, long p, long r); void Merge(vector &v, long p, long q, long r); void PrintArray(vector v); long long int count; int main() { extern long long int count; long n, i, t; vector v; //freopen("input.t

[algogeeks] Re: HASHIT

2011-06-15 Thread KK
Thanks dude!! -- 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