Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread Amol Sharma
given array- 1 0 0 1 1 1 0 1 0 1 for our convenience lets replace 0 by -1 array becomes 1 -1 -1 1 1 1 -1 1 -1 1 take another array count which which represents the sum till that index sum array becomes 1 0 -1 0 1 2 1 2 1 2 //count array now make an important

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread Amol Sharma
complexity O(n) extra space O(n) -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad http://gplus.to/amolsharma99 http://twitter.com/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://youtube.com/amolsharma99 On Thu, Sep 29, 2011 at 11:52 AM,

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread UTKARSH SRIVASTAV
@Amol +1 On Thu, Sep 29, 2011 at 11:52 AM, Amol Sharma amolsharm...@gmail.comwrote: given array- 1 0 0 1 1 1 0 1 0 1 for our convenience lets replace 0 by -1 array becomes 1 -1 -1 1 1 1 -1 1 -1 1 take another array count which which represents the sum till that index sum

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread Shravan Kumar
O/P should be 00111010 and sub array is exclusive of start index, inclusive of end index. Nice solution On Thu, Sep 29, 2011 at 11:58 AM, UTKARSH SRIVASTAV usrivastav...@gmail.com wrote: @Amol +1 On Thu, Sep 29, 2011 at 11:52 AM, Amol Sharma amolsharm...@gmail.comwrote: given array- 1

[algogeeks] Tally Solutions Review

2011-09-29 Thread Chunky Garg
Can anyone tell me about tally solutions pvt ltd. how is the company and growth in it.. what all is asked in interviews.. -- Regards Chunky Garg -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread kartik sachan
@AMOL i want array index i.e i to j that will be max subarry which has equal no of zero and one's but i think ur soln is not providing this -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread DIVIJ WADHAWAN
Impossible to solve in O(n) I suppose On Thu, Sep 29, 2011 at 12:34 PM, kartik sachan kartik.sac...@gmail.comwrote: @AMOL i want array index i.e i to j that will be max subarry which has equal no of zero and one's but i think ur soln is not providing this -- You received this message

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread Amol Sharma
@kartik...try to implement the algo using pen and paper take 2-3 extra variables for storing index also along with the variable max.the same algo will also give you the required subarray indexes along with its length... -- Amol Sharma Third Year Student Computer Science and Engineering

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread kartik sachan
ok amol i will do it..but i am unable to convience myself that this algo will give the desire result -- 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

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread apoorv gupta
sachan!!amol ke rum par jaakar pooch le. On Thu, Sep 29, 2011 at 1:10 PM, kartik sachan kartik.sac...@gmail.comwrote: ok amol i will do it..but i am unable to convience myself that this algo will give the desire result -- You received this message because you are subscribed to

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread Wladimir Tavares
Algorithm Kadane http://www.algorithmist.com/index.php/Kadane%27s_Algorithm http://www.cs.ucf.edu/~reinhard/classes/cop3503/lectures/AlgAnalysis04.pdf http://struts2spring.wordpress.com/2009/11/02/finding-the-maximum-contiguous-subsequence-in-a-one-dimensional-array/ Wladimir Araujo Tavares

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread Wladimir Tavares
First, you need change 0 to -1 Wladimir Araujo Tavares *Federal University of Ceará http://lia.ufc.br/%7Ewladimir/ Homepage http://lia.ufc.br/%7Ewladimir/ | Maratonahttps://sites.google.com/site/quixadamaratona/| * On Thu, Sep 29, 2011 at 7:35 AM, Wladimir Tavares wladimir...@gmail.comwrote:

Re: [algogeeks] Re: BST in file

2011-09-29 Thread surender sanke
@asit dhal, in order of any BST is increasing order. so required is only either preorder/postorder surender On Tue, Sep 27, 2011 at 12:42 AM, Gene gene.ress...@gmail.com wrote: Here is a little program to show how it works. It's a nice little problem. There is also a coding with recursion.

[algogeeks] Infinite Array

2011-09-29 Thread pooja
Given a sorted Array of infinite length.. what is the most optimum way to search for an element. We hane no idea about its length.. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Infinite Array

2011-09-29 Thread sumit kumar pathak
*search for elements at 2^0 , 2^1, 2^2 and so on ... * * * * *regards - Sumit Kumar Pathak (Sumit/ Pathak/ SKP ...) *Smile is only good contagious thing.* *Spread it*! On Thu, Sep 29, 2011 at 5:29 PM, pooja pooja27tan...@gmail.com wrote: Given a sorted Array of infinite length.. what is

[algogeeks] Re: THANX ALGOGEEKS !!!!!!

2011-09-29 Thread rahul sharma
hey dude plz post the written test question as much as u remeberneded urgent ..plz post On Sep 24, 8:26 pm, Deoki Nandan deok...@gmail.com wrote: congrats buddy On 23 September 2011 17:31, siddharth srivastava akssps...@gmail.comwrote: Hi Congrats What did you answer for

[algogeeks] cdoc

2011-09-29 Thread sourabh jain
cdoc visited anywhere? tell me details? Regards SOURABH KUMAR JAIN NIT RAIPUR -- 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

[algogeeks] Re: Infinite Array

2011-09-29 Thread Don
To search for element T in array A[], start at a point p 0. If A[p] T, do a binary search on range 0..p. Otherwise set p = 1 + p * (T - A[0]) / (A[p] - A[0]). Repeat until A[p] = T. Then the current and previous values of p are an interval containing T (if T is in A). Do a binary search on that

Re: [algogeeks] Re: symantec

2011-09-29 Thread rashmi i
mmm... i dont remember the questions but these are the 1s i faintly remember: 1. semaphore based qs 2. a question from theory of computation 3. some questions on the big O-notation. 4. b-tree vs b+-tree 5. some questions on unix 6. http,tcp based qs.. well sorry but these r da 1s i m able 2

Re: [algogeeks] Amazon - array problem

2011-09-29 Thread Ankur Garg
Is the array Sorted ? On Thu, Sep 29, 2011 at 4:56 PM, raju nikutel...@gmail.com wrote: Given an integer array. { 1,2,3,4,5 } Compute array containing elements 120,60,40,30,24 (2*3*4*5,1*3*4*5, 1*2*4*5, 1*2*3*5, 1*2*3*4) We shouldn't use division operator( / ) Time complexity O(n) ..

Re: [algogeeks] Amazon - array problem

2011-09-29 Thread UTKARSH SRIVASTAV
maintain two arrays one left array having value left[i] = a[0]*a[1]*a[2].a[i-1] and one right array having value right[i]=a[i+1]*[i+2]a[n] and then to get ans[i]...ans[i]=left[i]*right[i] On Thu, Sep 29, 2011 at 8:16 PM, Ankur Garg ankurga...@gmail.com wrote: Is the array Sorted ?

Re: [algogeeks] Re: THANX ALGOGEEKS !!!!!!

2011-09-29 Thread malay chakrabarti
congratzwat's d package which they offered in your campus? On Thu, Sep 29, 2011 at 7:13 PM, rahul sharma rahul23111...@gmail.comwrote: hey dude plz post the written test question as much as u remeberneded urgent ..plz post On Sep 24, 8:26 pm, Deoki Nandan deok...@gmail.com wrote:

Re: [algogeeks] Amazon - array problem

2011-09-29 Thread Shravan Kumar
whats the running time? isn't it O(n2) ? On Thu, Sep 29, 2011 at 8:54 PM, UTKARSH SRIVASTAV usrivastav...@gmail.comwrote: maintain two arrays one left array having value left[i] = a[0]*a[1]*a[2].a[i-1] and one right array having value right[i]=a[i+1]*[i+2]a[n] and then to get

Re: [algogeeks] Amazon - array problem

2011-09-29 Thread KARTHIKEYAN V.B.
//use dynamic programming approach //it is O(n) time and O(1) space #includestdio.h #define N 5 void main() { int a[N]={1,2,3,4,5},i; int prod1[N]; int p=1; for(i=0;iN;++i) { prod1[i]=p; p*=a[i]; } int prod2[N]; p=1; for(i=N-1;i=0;--i) { prod2[i]=p; p*=a[i]; } int products[N];

[algogeeks] why only static and global variables have default initial value 0.....why not automatic variables have???

2011-09-29 Thread tech rascal
-- 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

Re: [algogeeks] why only static and global variables have default initial value 0.....why not automatic variables have???

2011-09-29 Thread prasanth n
may be bcoz they(auto) are stored in stack On Thu, Sep 29, 2011 at 10:05 PM, tech rascal techrascal...@gmail.comwrote: -- 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

[algogeeks] INTEL recruitment process

2011-09-29 Thread aditya kumar
Guys does any one hve the idea about INTEL interview process for CS students ?? The area they focus and types of question they ask . If any have any idea plz help ! thnks -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group,

Re: [algogeeks] why only static and global variables have default initial value 0.....why not automatic variables have???

2011-09-29 Thread saurabh singh
The global and the static variables are stored in the data section. But the only legitimate answer that comes to my mind is that the makers believed there language will be used by smart coders so they left it for the programmers to fix. While the java makers believed somewhat different so they

Re: [algogeeks] Re: Yahoo

2011-09-29 Thread aditya kumar
u can use any lang . perl python etc . On Thu, Sep 29, 2011 at 10:57 AM, prasanth n nprasnt...@gmail.com wrote: c++ and java ll be given more preference On Mon, Sep 26, 2011 at 5:59 PM, abhishek abhishek.ma...@gmail.comwrote: c,c++ ,java On Sep 26, 4:15 pm, Akash Mukherjee

Re: [algogeeks]

2011-09-29 Thread saurabh singh
bhai yaarsizeof operator use kar ke dekh le na...:P read about virtual pointer(virtual table) and inheritance On Thu, Sep 29, 2011 at 8:55 PM, UTKARSH SRIVASTAV usrivastav...@gmail.comwrote: how does virtual class and virtual function affect class size any good link? --

[algogeeks] Linked List Problem

2011-09-29 Thread Ankuj Gupta
There are two linked list of length m and n. There is some common data at the end of both. Find the starting position in both the linked list. I could suggest two methods 1) Reverse the list and check . 2) Use recursion to go to the last element and move back from there. Is there any other way ?

Re: [algogeeks] Linked List Problem

2011-09-29 Thread prasanth n
consider the length of list1 is 7(ie m) and length of list2 is 5 (ie n)..now find (m-n) ie 7-5=2..since length of list2 is smaller than list1,,have a pointer pointing to the head of the list2 and move that pointer (m-n) positions ie (here 2 positions)..now have a pointer pointing to the head of

[algogeeks] Number of Multiplications

2011-09-29 Thread Ankuj Gupta
How do you deduce number of multiplication that when we perform a^b function using dividing the exponent by 2 at each stage to be log b? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks] Re: Number of Multiplications

2011-09-29 Thread Don
Because a^b = (a*a)^(b/2), so each multiplication reduces the exponent by half. Therefore the number of multiplications is (roughly) log2 b. int pow(int a, int b) { int result = a; while(b 1) { result *= (b1) ? a*result : result; b = 1; } return result; } You can see that a^16

Re: [algogeeks] is it possible??

2011-09-29 Thread UTKARSH SRIVASTAV
you can use _start function in c and then compile with gcc -nostartfile On Mon, Sep 19, 2011 at 2:39 PM, Prakash D cegprak...@gmail.com wrote: in c/c++ without main function how to write a compilable code? for example printing a string On Tue, Sep 20, 2011 at 12:15 AM, hary rathor

[algogeeks] Re: SPOJ PIGBANK Problem

2011-09-29 Thread Don
I think that it will fail if the value of the coins can be more than 50001. Don On Sep 29, 12:35 pm, manish patel manispatel...@gmail.com wrote: http://www.spoj.pl/problems/PIGBANK/ please suggest some test case where it fails ... [code] #includestdio.h main() {    int t=0,n,e,f,i,j;    

Re: [algogeeks] Tally Solutions Review

2011-09-29 Thread Sahil Garg
plz do tell.. i also need sm intervw questions at the earliest.. Sahil Garg Computer Engineering Delhi College of Engineering On Thu, Sep 29, 2011 at 12:26 PM, Chunky Garg g.chunkyg...@gmail.comwrote: Can anyone tell me about tally solutions pvt ltd. how is the company and growth in it..

Re: [algogeeks] is it possible??

2011-09-29 Thread Hatta
in ELF compatible binaries it's also possible to use .ctors / .dtors not sure whether PES has similar sections but I believe it does. On Thu, Sep 29, 2011 at 3:42 PM, UTKARSH SRIVASTAV usrivastav...@gmail.comwrote: you can use _start function in c and then compile with gcc -nostartfile On

[algogeeks] Explain Output

2011-09-29 Thread Brijesh
void main() { void *ptr; char *a='A'; char *b=TAN; int i=50; ptr=a; ptr=(*char)malloc(sizeof(a)); printf(%c,*ptr); ptr=i; ptr=(*int)malloc(sizeof(i)); printf(%d,++(*ptr)); ptr=b; ptr=(*char)malloc(sizeof(b)); printf(%c,++(*ptr)); } Ans: A51AN Please explain the output.. Doesnt this line

[algogeeks] Explain output

2011-09-29 Thread Brijesh
void main() { void *ptr; char *a='A'; char *b=TAN; int i=50; ptr=a; ptr=(*char)malloc(sizeof(a)); printf(%c,*ptr); ptr=i; ptr=(*int)malloc(sizeof(i)); printf(%d,++(*ptr)); ptr=b; ptr=(*char)malloc(sizeof(b)); printf(%c,++(*ptr)); } ptr=(*char)malloc(sizeof(a)); Ans: A51AN Please explain the

[algogeeks] How to Improve efficiency of this code? [SPOJ - HS11DIVS]

2011-09-29 Thread .itoa
This is the question : https://hs.spoj.pl/problems/HS11DIVS/ [ Count the numbers ! - HS11DIVS ] And here is my attempt : http://ideone.com/yynjH Now , my problem is that the code works fine with small numbers ( even with 1 ) , but with larger number , time limit exceeds. How to make it

Re: [algogeeks] How to Improve efficiency of this code? [SPOJ - HS11DIVS]

2011-09-29 Thread shady
i think you can avoid calculating sumOfDigits(a) each time. Similarly compute for all the values directly. On Fri, Sep 30, 2011 at 1:11 AM, .itoa nitm...@gmail.com wrote: Yeah , that is exactly what my question is. How to optimize ? -- You received this message because you are subscribed to

Re: [algogeeks] How to Improve efficiency of this code? [SPOJ - HS11DIVS]

2011-09-29 Thread shady
that's a brute force approach, obviously it won't work. On Fri, Sep 30, 2011 at 12:52 AM, .itoa nitm...@gmail.com wrote: This is the question : https://hs.spoj.pl/problems/HS11DIVS/ [ Count the numbers ! - HS11DIVS ] And here is my attempt : http://ideone.com/yynjH Now , my problem is that

Re: [algogeeks] Amazon - array problem

2011-09-29 Thread Amol Sharma
check this http://www.geeksforgeeks.org/archives/7527 time O(n) space O(n) -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad http://gplus.to/amolsharma99

Re: [algogeeks] How to Improve efficiency of this code? [SPOJ - HS11DIVS]

2011-09-29 Thread .itoa
sumOfDigits has to be called for ALL values. we need to check sum for all possible values which are divisible by x. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

Re: [algogeeks] How to Improve efficiency of this code? [SPOJ - HS11DIVS]

2011-09-29 Thread shady
yes, you have already calculated it for first value... so need not compute it again On Fri, Sep 30, 2011 at 1:21 AM, .itoa nitm...@gmail.com wrote: sumOfDigits has to be called for ALL values. we need to check sum for all possible values which are divisible by x. -- You received this

Re: [algogeeks] Amazon - array problem

2011-09-29 Thread Hatta
are the algorithm instance always a sequence incremented by one? On Thu, Sep 29, 2011 at 8:26 AM, raju nikutel...@gmail.com wrote: Given an integer array. { 1,2,3,4,5 } Compute array containing elements 120,60,40,30,24 (2*3*4*5,1*3*4*5, 1*2*4*5, 1*2*3*5, 1*2*3*4) We shouldn't use division

[algogeeks] Re: indus valley partner doubt

2011-09-29 Thread techankur
Hi Ravi IVP visited in PEC on 29th so you can ask any of the CSE or IT guys who have given the exam.. I haven't given it otherwise I would have let you know the procedure.. Though there was a written test followed by essay writing and then a Technical and HR interview.. Ankur Mittal On Sep 28,

Re: [algogeeks] Amazon - array problem

2011-09-29 Thread Piyush Grover
Given array A. Compute array B such that B[0] = 1; for(i = 1; i n; i++) B[i] = B[i-1]*A[i-1] now, mul = 1; for (i = n-2; i =0; i--){ mul = mul*A[i]; B[i] = B[i]*mul; } On Fri, Sep 30, 2011 at 2:18 AM, Hatta tmd...@gmail.com wrote: are the algorithm instance always a sequence

Re: [algogeeks] Amazon - array problem

2011-09-29 Thread Piyush Grover
sorry, one mistake... mul = mul*A[i]; it should be mul = mul*A[i+1] On Fri, Sep 30, 2011 at 2:57 AM, Piyush Grover piyush4u.iit...@gmail.comwrote: Given array A. Compute array B such that B[0] = 1; for(i = 1; i n; i++) B[i] = B[i-1]*A[i-1] now, mul = 1; for (i = n-2; i =0;

[algogeeks] Re: Infinite Array

2011-09-29 Thread Rahul Tiwari
@Don ... optimal one ... +1 On Sep 29, 7:32 pm, Don dondod...@gmail.com wrote: To search for element T in array A[], start at a point p 0. If A[p] T, do a binary search on range 0..p. Otherwise set p = 1 + p * (T - A[0]) / (A[p] - A[0]). Repeat until A[p] = T. Then the current and previous

[algogeeks] Re: Number of Multiplications

2011-09-29 Thread Dave
@Don, Ankuj. I believe that Don's algorithm uses precisely floor{log_2(b)) + (the number of one bits in b) - 1. Dave On Sep 29, 1:38 pm, Don dondod...@gmail.com wrote: Because a^b = (a*a)^(b/2), so each multiplication reduces the exponent by half. Therefore the number of multiplications is

Re: [algogeeks] Explain output

2011-09-29 Thread Kunal Patil
Why don't you post a code that compiles ? On Fri, Sep 30, 2011 at 12:41 AM, Brijesh brijeshupadhyay...@gmail.comwrote: void main() { void *ptr; char *a='A'; char *b=TAN; int i=50; ptr=a; ptr=(*char)malloc(sizeof(a)); printf(%c,*ptr); ptr=i; ptr=(*int)malloc(sizeof(i));

Re: [algogeeks] Re: Number of Multiplications

2011-09-29 Thread praveen raj
Make two conditions for even and odd power. and use it to make solve higher power That could be solved in log b time . On 30-Sep-2011 4:12 AM, Dave dave_and_da...@juno.com wrote: @Don, Ankuj. I believe that Don's algorithm uses precisely floor{log_2(b)) + (the number of one bits in b) -

Re: [algogeeks] Amazon - array problem

2011-09-29 Thread praveen raj
Take two array... one will take care of left products... and othr will take care of right product.. at any index left[i]=A[i-1]*left[i-1] starting from left and right[i]= A[i+1]*right[i+1] starting frm right…… -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Re: Infinite Array

2011-09-29 Thread praveen raj
@don we dnt hve ny info about arrangement... -- 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] Explain output

2011-09-29 Thread praveen raj
Ptr cannot be used to allocate block of memory .. void pointer use only to store address... -- 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] Linked List Problem

2011-09-29 Thread annarao kataru
@prasanth but how can u know that it will start after the difference of the number of nodes (m-n) . they may be similar even after one element also ?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Linked List Problem

2011-09-29 Thread partik madan
@annarao : as the common data is at the end of the linked lists so the length of common data can not be greater than the length of shorter linked list . so i think prasanth is right !! -- *Partik Madan* Computer Engg. NIT Kurukshetra -- You received this message because you are subscribed

Re: [algogeeks] Linked List Problem

2011-09-29 Thread annarao kataru
@partik oh i forgot it thank u for ur clarification.. -- 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] Linked List Problem

2011-09-29 Thread siddharam suresh
@Ankuj Gupta: your algo wont work see,what happens when ur algo run. list1 1-2-3-4-5-6 list2 9-8-4-5-6 reverse list 1 list1 6-5-4-3-2-1 6-5-4 ^ | list2 8-9 reverse list 2 list1 6-5-4-9-8 list2 4-9-8 Thank you, Sid. On Fri, Sep 30, 2011 at 9:37

Re: [algogeeks] cdoc

2011-09-29 Thread siddharam suresh
i never heard about the company called cdoc it may be cdac or cdot Thank you, Sid. On Thu, Sep 29, 2011 at 7:48 PM, sourabh jain sourabhjain...@gmail.com wrote: cdoc visited anywhere? tell me details? Regards SOURABH KUMAR JAIN NIT RAIPUR -- You received this message because

Re: [algogeeks] Linked List Problem

2011-09-29 Thread sukran dhawan
find length of linked list 1 say m find length of linked list2 say n take mod(m-n) say k traverse k nodes in bigger lis after that both listts one position at a time until the pointers are equal On Fri, Sep 30, 2011 at 9:34 AM, partik madan partikma...@gmail.com wrote: @annarao : as the common

Re: [algogeeks] Explain output

2011-09-29 Thread rahul sharma
ptr is givenc char addrsss so print A ptr given int address but ++(*ptr) increments that int val so it goes 51 next ptr contains char address of char but i think ++(*ptr) gives ua insetead un an On Fri, Sep 30, 2011 at 9:24 AM, praveen raj praveen0...@gmail.com wrote: Ptr cannot be used to

Re: [algogeeks] Explain output

2011-09-29 Thread rahul sharma
n in last it prints an of o/p a51an but only %c used so i thhink somethng wrngexplain nyone plz On Fri, Sep 30, 2011 at 10:34 AM, rahul sharma rahul23111...@gmail.comwrote: ptr is givenc char addrsss so print A ptr given int address but ++(*ptr) increments that int val so it goes

[algogeeks] STRING help

2011-09-29 Thread rahul sharma
what is c style string??n wats diff b/w c and c++ strings representtaion.. -- 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] Re: How to Improve efficiency of this code? [SPOJ - HS11DIVS]

2011-09-29 Thread .itoa
*UPDATED *the first() function. Instead of using a loop , using m=a%x and a = a-m+x to find the first divisible number. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit