i think solution would be like this
eg:
A : 1 2 3 B: 0 1.5 4 5 9
Output:
A can contain any combination of nos 0,1,1.5
and B should contain 2 3 4 5 9 (in any order.)
this example is given by ROSS itself.
so sravanreddy solution is right , correct me if i'm wrong.
On Jun 3, 8:07 pm, bittu
*Hi*
*
*
*Puzzle Digest Of The Week 30May - 03July*
*
*
*
http://dailybrainteaser.blogspot.com/2011/06/life-or-death-3-june.html?lavesh=lavesh
*
*
*
*http://dailybrainteaser.blogspot.com/2011/06/assemble-riddle-2-april.html?*
*lavesh=lavesh*
*
*
statement starts executing from the right side!!! 1st it reads it
from left !! while reading b increment two times and new value of b is
thn 5 nw it gets executed!!!
am i right??
On 6/4/11, hary rathor harry.rat...@gmail.com wrote:
in 1st pass
both ++b
++b= 4 then ++b= 5;
at second pass
Hi Rohit all,
Sorry that there was a small typo in the 'n' 'm' texts.
The example given by me is anyway the correct one.
Sravan Reddy's solution worked fine.
On Jun 4, 10:08 am, rohit rajuljain...@gmail.com wrote:
i think solution would be like this
eg:
A : 1 2 3 B: 0 1.5 4 5 9
Output:
A
say memory location is 0x33f070 of int *x=new int(p);
p is some value at that location. we have to find p at that location using
some indirect way...
without using cout(void*x); Is there any other way to find p?
--
**With Regards
Deoki Nandan Vishwakarma
IITR MCA
Mathematics Department*
*
--
For the rotation case, sort on the basis of volume...
On 6/4/11, NIKHIL nikhil.jain.shali...@gmail.com wrote:
given the boxes with dimentions in form (L,B,H)
find the sequence in which the boxes can be stored inside the other.
for eg.
a=4,4,5
b=3,4,3
c=3,4,6
d=2,3,2
a(b(d))
without
Sorry but the context is not very clear. What exactly are you trying
to do?
Looks like you want to allocate space for an integer value and assign
the value p to it.
So, you need to refer it with some pointer (in this case x).
On Jun 4, 2:24 pm, D.N.Vishwakarma@IITR deok...@gmail.com wrote:
say
I'm saying that int *x=new int(3); is a statement .
I want to find value at location allocated by new which is 3 in this case by
indirect way ... without use of (void*)x.
On Sat, Jun 4, 2011 at 3:23 PM, Navneet navneetn...@gmail.com wrote:
Sorry but the context is not very clear. What exactly
Can't think of any trivial/straight forward way of doing that other
than dereferencing pointer.
On Sat, Jun 4, 2011 at 3:34 PM, D.N.Vishwakarma@IITR deok...@gmail.com wrote:
I'm saying that int *x=new int(3); is a statement .
I want to find value at location allocated by new which is 3 in this
For rotation case, take all the orientation of a box in account and
now apply the same algo
On Sat, Jun 4, 2011 at 3:13 PM, Piyush Sinha ecstasy.piy...@gmail.com wrote:
For the rotation case, sort on the basis of volume...
On 6/4/11, NIKHIL nikhil.jain.shali...@gmail.com wrote:
given the
@Nate...Both TinyUrl Bit.ly Fails in case of our web address is less
then length of their(tinyurl/bit.ly) names..
example if u will try http://www.a.com/a (num of chars 18) in
tinyurl.com it will convert http://tinyurl.com/cl3nc4 which 25 chars
long surly greater then original url length so
well i can speak much on these question.as these algorithms are part
of web crawler ..but do u mean we have to detect the duplicate files,
by file having same size are duplicates..??
also same question raised by me few days back Detecting Duplicate
Documents but no one seems to interested u can
I am still working on arriving at a recursive solution but these links might
help.
http://mathworld.wolfram.com/TriangleTiling.html
http://oeis.org/A002717
http://oeis.org/A002717
On Mon, Mar 21, 2011 at 5:50 PM, cegprakash cegprak...@gmail.com wrote:
hello... someone plz tell me how to arrive
i also thought its relative to database but ultimately it also
depends on the data structure Algorithms used by database to
implement the particularly query.
The simpler implementation of this service is to store, in a database
table, a data pair (id, url) where your id has the autoincrement
but is my logic correct i have tried it for some cases
On Sat, Jun 4, 2011 at 4:20 PM, Vipul Kumar vipul.k.r...@gmail.com wrote:
For rotation case, take all the orientation of a box in account and
now apply the same algo
On Sat, Jun 4, 2011 at 3:13 PM, Piyush Sinha ecstasy.piy...@gmail.com
Also http://www.mathematik.uni-bielefeld.de/~sillke/SEQUENCES/grid-triangles.
Dave
On Jun 4, 8:28 am, Anirudh S anirudh24se...@gmail.com wrote:
I am still working on arriving at a recursive solution but these links might
help.
http://mathworld.wolfram.com/TriangleTiling.html
then u can use radix sort ...
--
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
[ ] meas addtion is addition is base address so 3 +Ya!Hello! how is
this? %s\n
become Hello! how is this? %s\n cause of add 3 in base address in
followed string ;
this result as format specifier in printf funcution ; same as for second
perameter ;
5+junk/super become super string reson is
Please tell me the commands to use the gdb debugger
To run the code line by line
--
Regards,
Nitish Goyal
Undergraduate Student Of NSIT,
Computer Engineering (B.E.)
Asst. PlaceComm 2011
contact me:- +91-605824
Reply at :- nitishgoyal.n...@gmail.com
--
You received this message because
n
On Sat, Jun 4, 2011 at 11:16 PM, nitish goyal nitishgoy...@gmail.comwrote:
Please tell me the commands to use the gdb debugger
To run the code line by line
--
Regards,
Nitish Goyal
Undergraduate Student Of NSIT,
Computer Engineering (B.E.)
Asst. PlaceComm 2011
contact me:-
n ?
do not understand it.
Please elaborate
On Sat, Jun 4, 2011 at 11:17 PM, rahul rahulr...@gmail.com wrote:
n
On Sat, Jun 4, 2011 at 11:16 PM, nitish goyal nitishgoy...@gmail.comwrote:
Please tell me the commands to use the gdb debugger
To run the code line by line
--
Regards,
gdb a.out
b(break) main .
den do press n(next) to execute next stmt.
if next instruction is function...
press s(step).
On Sat, Jun 4, 2011 at 11:19 PM, nitish goyal nitishgoy...@gmail.comwrote:
n ?
do not understand it.
Please elaborate
On Sat, Jun 4, 2011 at 11:17 PM, rahul
the area points , boundary on which circle need to display
and radius should not be negative
--
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,
Do man gdb
On Sat, Jun 4, 2011 at 11:20 PM, rahul rahulr...@gmail.com wrote:
gdb a.out
b(break) main .
den do press n(next) to execute next stmt.
if next instruction is function...
press s(step).
On Sat, Jun 4, 2011 at 11:19 PM, nitish goyal nitishgoy...@gmail.comwrote:
n ?
do not
#includestdio.h
int main()
{
float a[]={13.24,1.5,1.5,5.4,3.5};
float *j;
j=a;
j=j+4;
printf(\n%d,%d,%d,j,*j,a[4]);
float p=3.5;
printf(\n%f,%d,p,p);
p=4.5;
printf(\n%d,%f,p,p);
}
output
-1080027596,0,1074528256
3.50,0
0,0.00
plzz explain y i
@ saurabh singh
thanks
On Sat, Jun 4, 2011 at 11:44 PM, saurabh singh saurabh.n...@gmail.comwrote:
Do man gdb
On Sat, Jun 4, 2011 at 11:20 PM, rahul rahulr...@gmail.com wrote:
gdb a.out
b(break) main .
den do press n(next) to execute next stmt.
if next instruction is function...
press
i wasn't able to think of other method but why are you using cout(void
*)p; for dereferencing.
cout*x is working to find to the value at memory ocation x.
On Sat, Jun 4, 2011 at 3:09 AM, Navneet Gupta navneetn...@gmail.com wrote:
Can't think of any trivial/straight forward way of
@Himanshi: Seeing as how you are printing memory addresses and floats
with a double format, what output are you expecting?
Dave
On Jun 4, 1:21 pm, himanshi narang himanshinarang...@gmail.com
wrote:
#includestdio.h
int main()
{
float a[]={13.24,1.5,1.5,5.4,3.5};
float *j;
j=a;
Your format specifiers in the printf statements are not right.
Also integers and floats are stored differently internally. Also, you have
to explicitly cast float into int as automatic conversion is not applicable
here in printf.
I hope this code helps your cause ,
#includestdio.h
int main()
{
read ch1 in understanding pointers in c by kanetkar.. it says tht if u use
%d format specifier to print a float an unknown value will come.. and if use
%f to print an integer then also unknown value will come.. so u r not
supposed to switch format specifiers like this
On Sun, Jun 5, 2011 at 12:33
Order of evaluation of operands is not defined in C and secondly the result
will be compiler implementation dependent. A compiler may store the sub
expressions operand values in a temporary storage or can make use of
variable value as an operand.
*In each case, either of the ++b may be executed
read how the floating numbers are stored in memory it will help
i understood the most except this ---
float p=4.5;
printf(\n%f,%d,p,p);
*output -
*4.50,0
and if we use
printf(\n%d,%f,p,p);
*output -
*0,0.0
i want to know why just changing the order of %d and %f is
actualy i want to knw dat if i m using integer format for printing a
floating point number den for *j it is giving 0 but for a[4] its giving some
value
but as u guys says it give unknwn value..den fyn..
but in 3rd printf wen i am giving integer format before float format its
giving me 0 n
i agree this type of expressions are not defined and are depend on the
machine..
it's something like a[i]=i++;
the result may vary from machine to machine !
On Sat, Jun 4, 2011 at 5:00 PM, Rohit Sindhu rohit.sindhu.spec...@gmail.com
wrote:
1. If the operand values is to be stored in
that's what i said changing the order of %f and %d is changing the output in
the 3rd printf.if you put %f before the %d then it gives you the
expected output.
On Sat, Jun 4, 2011 at 9:10 PM, himanshi narang himanshinarang...@gmail.com
wrote:
actualy i want to knw dat if i m using
On Sun, Jun 5, 2011 at 9:59 AM, nicks crazy.logic.k...@gmail.com wrote:
that's what i said changing the order of %f and %d is changing the output
in the 3rd printf.if you put %f before the %d then it gives you the
expected output.
On Sat, Jun 4, 2011 at 9:10 PM, himanshi narang
first time when i pre processed, my code timed out :P on calling it for
every loop iteration my code passed !! may be tats the problem...
On Sun, Jun 5, 2011 at 1:56 AM, kartik sachan kartik.sac...@gmail.comwrote:
@arun.i got nothing from this link becoz i have made the
program
http://www.yolinux.com/TUTORIALS/GDB-Commands.html
this may help
On Sat, Jun 4, 2011 at 11:57 PM, nitish goyal nitishgoy...@gmail.com wrote:
@ saurabh singh
thanks
On Sat, Jun 4, 2011 at 11:44 PM, saurabh singh saurabh.n...@gmail.com
wrote:
Do man gdb
On Sat, Jun 4, 2011 at 11:20 PM,
@nicks
KR says
A warning: printf uses its first argument to decide how many
arguments follow and what their type are. It will get confused and you
will get wrong answer. if there are not enough arguments or if they
are the wrong types.
I think that is the reason for unpredictable output.
On Jun 5,
39 matches
Mail list logo