There are 10 coins in a bag.
3 coin weights x kg
3 coins weights y kg
2 coins weights z kg
2 coins weights w kg
You have to separate them into separate heaps according to their weights.
--
You received this message because you are subscribed to the Google Groups
Algorithm
u have to separate them into 4 heaps in min number of comparisons .
given a weighing balance
On Sun, Jun 10, 2012 at 12:05 PM, Saurabh Yadav saurabh...@gmail.comwrote:
question is incomplete , mention the conditions please
On Sun, Jun 10, 2012 at 11:44 AM, HARSHIT PAHUJA
hpahuja.mn
anyways to override this error , like in c++ or c# we use
virtual keyword
--
HARSHIT PAHUJA
M.N.N.I.T.
ALLAHABAD
--
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
given 2 unsorted integer arrays a and b of equal size. Determine if b is a
permutation of a. Can this be done in O(n) time and O(1) space ?
please help me with my solution
suppose a -- 3 5 4
b -- 4 3 5
now we replace a[i] with a[i]..th prime number and b with b[i] .. th
@malay --- we can do it by precomputing the prime arrays
On Sun, May 20, 2012 at 1:10 AM, malay chakrabarti m1234...@gmail.comwrote:
method is ryt but to find ith prime u cannot to it in constant time.
On May 19, 2012 7:30 PM, HARSHIT PAHUJA hpahuja.mn...@gmail.com
, 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.
--
HARSHIT PAHUJA
M.N.N.I.T.
ALLAHABAD
--
You received this message because
*#includestdio.h
int main()
{
float f=25.25;
printf(%d\n,f);
long int x=90;
printf(%f,x);
return 0;
}
*
above program gives output
*0
25.25*
shudn it be :
*25
90.*
??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
at 1:13 AM, harshit pahuja hpahuja.mn...@gmail.com
wrote:
http://en.wikipedia.org/wiki/Josephus_problem
here there is an explanation of the derivation of josephus which is nt
very
clearcan some1 explain it plzz
On Wed, Jun 29, 2011 at 12:40 PM, harshit pahuja
hpahuja.mn
nd dp...*
*
*
nw in its variant which is the spoj problem we have to kill evert kth person
but we have to start by killing 1st den (k+1)th den(2k+1)th so on
i m nt able to modify the above problem
plzz help
--
HARSHIT PAHUJA
M.N.N.I.T.
ALLAHABAD
--
You received this message because
http://en.wikipedia.org/wiki/Josephus_problem
here there is an explanation of the derivation of josephus which is nt very
clearcan some1 explain it plzz
On Wed, Jun 29, 2011 at 12:40 PM, harshit pahuja hpahuja.mn...@gmail.comwrote:
Hello guys...
http://www.spoj.pl/problems/POCRI
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.
--
HARSHIT PAHUJA
M.N.N.I.T.
ALLAHABAD
--
You received this message because you
hw u r gettin 3
i m gettin 4
mine is make 4 grups
1,2,6 no 1
2,3,5 no 2
1,3,4 no 3
4,5,6no 4
nw out of 4 2 mice will die,and in their corresponding groups common bottle
will give you the answer.
correct me if i am wrong
--
You received this message
i got it :)
nice @dev!!
--
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,
#includestdio.h
#define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0]))
int array[] = {23,34,12,17,204,99,16};
int main()
{
int d;
for(d=-1;d = (TOTAL_ELEMENTS-2);d++)
printf(%d\n,array[d+1]);
return 0;
}
y der is nothing in the output .
-
Regards -
HARSHIT PAHUJA
--
You received
this is ma code for http://www.spoj.pl/problems/ANARC08H/musical
chairs
i m using dynamic programming
for input lik
20 20
i m getting seg. fault
plz tell hw to modify my program
#includeiostream
#includecstdio
using namespace std;
long long arr[10003][10003];
long long f(int
@piyush
using array is mecessary as constraints are n,d100
so recursion cannot go to that much depth as we have stack limits
what do u suggest
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
got it
:) AC
used single array nd got the job done..
On Thu, Jun 23, 2011 at 4:22 AM, harshit pahuja hpahuja.mn...@gmail.comwrote:
@piyush
using array is mecessary as constraints are n,d100
so recursion cannot go to that much depth as we have stack limits
what do u
options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
HARSHIT PAHUJA
M.N.N.I.T.
ALLAHABAD
--
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
, 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.
--
HARSHIT PAHUJA
M.N.N.I.T.
ALLAHABAD
--
You received this message
/group/algogeeks?hl=en.
--
HARSHIT PAHUJA
M.N.N.I.T.
ALLAHABAD
--
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
this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
HARSHIT PAHUJA
M.N.N.I.T.
ALLAHABAD
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group
...@gmail.comwrote:
or u cud consult ANSI C by Balaguruswamy in chapter of Console I/Ps and
O/Ps
On 6/23/11, harshit pahuja hpahuja.mn...@gmail.com wrote:
@rajeev
http://www.cplusplus.com/reference/clibrary/cstdio/scanf/
http://www.cplusplus.com/reference/clibrary/cstdio/printf
22 matches
Mail list logo