Re: [algogeeks] Write a program to Convert an ASCII representation of a positive integer to it's numeric value ??

2011-09-10 Thread sukran dhawan
u can use atoi function On Sat, Sep 10, 2011 at 10:26 PM, shady wrote: > #include > #include > > main(){ > char *s = "88934\0"; > int sum=0; > int i=0; > while(i int value = s[i]-'0'; > sum = 10*sum+value; > i++; >

Re: [algogeeks] Write a program to Convert an ASCII representation of a positive integer to it's numeric value ??

2011-09-10 Thread shady
#include #include main(){ char *s = "88934\0"; int sum=0; int i=0; while(i wrote: > Not able to find some good solution for this... > > > On Sat, Sep 10, 2011 at 10:17 PM, shady wrote: > >> string manipulation... google it. >> >> On Sat, Sep 10, 2011 at 10:06 PM,

Re: [algogeeks] Write a program to Convert an ASCII representation of a positive integer to it's numeric value ??

2011-09-10 Thread Ishan Aggarwal
Not able to find some good solution for this... On Sat, Sep 10, 2011 at 10:17 PM, shady wrote: > string manipulation... google it. > > On Sat, Sep 10, 2011 at 10:06 PM, Ishan Aggarwal < > ishan.aggarwal.1...@gmail.com> wrote: > >> >> >> -- >> Kind Regards >> Ishan Aggarwal >> [image: Aricent Gro

Re: [algogeeks] Write a program to Convert an ASCII representation of a positive integer to it's numeric value ??

2011-09-10 Thread shady
string manipulation... google it. On Sat, Sep 10, 2011 at 10:06 PM, Ishan Aggarwal < ishan.aggarwal.1...@gmail.com> wrote: > > > -- > Kind Regards > Ishan Aggarwal > [image: Aricent Group] > Presidency Tower-A, M.G.Road,Sector-14 > Gurgaon,Haryana.122015 INDIA > Phone : +91-9654602663 > ishan2.ag

Re: [algogeeks] Write a program

2011-09-10 Thread bharatkumar bagana
#include int main() { int a[]={3,1,2,1}; int n=4; int top=0,i; for(int i=0;i wrote: > Write a program to remove duplicate elements from an array by printing them > only once? > > What will be the minimum time and space complexity required for this > program? > > -- > Kind Regards > Ishan Aggarw

Re: [algogeeks] Write a program to find the empirical formulae from physical formulae

2011-08-10 Thread Prakash D
i think the given formula's solution should be c1 h33 o20 n10 check the question.. On Wed, Aug 10, 2011 at 9:49 PM, vikas wrote: > Write a program to find the empirical formulae from physical formulae > ex: ch3((oh)2(nh3)2)5 > has empirical formulae > c1 h43 o2 n10 > > -- > You received this

[algogeeks] Write a program to find the empirical formulae from physical formulae

2011-08-10 Thread vikas
Write a program to find the empirical formulae from physical formulae ex: ch3((oh)2(nh3)2)5 has empirical formulae c1 h43 o2 n10 -- 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.

[algogeeks] Write a program to arrange numbers from 1 to 16 such that the sum of two consecutive numbers is a perfect square

2010-09-13 Thread bittu
Write a program to arrange numbers from 1 to 16 such that the sum of two consecutive numbers is a perfect square in O(n) is solution possible in O(logn) Regards Shashank -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this grou

[algogeeks] Write a program to play a "dots and boxes" variation

2006-03-02 Thread POTM-MASTER
http://dinsights.com/POTM/LINESANDBOXES describes a game called "LINES and BOXES" which is similar to "DOTS and BOXES". The main rule differences: 1) you may draw lines longer than one box long; 2) play alternates turns (no bonus for capture); 3) the starting grid may be square or rectangular an