Re: [algogeeks] sol

2011-08-21 Thread Puneet Chawla
email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- With regards Puneet Chawla Computer Engineering Student NIT Kurukshetra -- You received this message because you are subscribed

Re: [algogeeks] Re: Puzzle

2011-08-21 Thread Puneet Chawla
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 http://groups.google.com/group/algogeeks?hl=en. -- With regards Puneet Chawla

Re: [algogeeks] c++

2011-08-21 Thread Puneet Chawla
@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. -- With regards Puneet Chawla Computer Engineering Student NIT Kurukshetra -- You received

[algogeeks]

2011-08-21 Thread Puneet Chawla
class base { public: int bval; base(){bval=0;} }; class deri:public base { public: int dval; deri(){dval=1;} }; void SomeFunc(base *arr,int size) { for(int i=0; isize; i++,arr++) coutarr-bval;

Re: [algogeeks]

2011-08-21 Thread Puneet Chawla
is 4 byte. On Sun, Aug 21, 2011 at 12:31 PM, Puneet Chawla puneetchawla...@gmail.com wrote: class base { public: int bval; base(){bval=0;} }; class deri:public base { public: int dval; deri(){dval=1

Re: [algogeeks] array problem

2011-08-21 Thread Puneet Chawla
Similary as we are counting set bits count 0's nd cmpare nd set 1 if coutn(1)count(0) for each integer in array On Sun, Aug 21, 2011 at 1:44 PM, Sanjay Rajpal srn...@gmail.com wrote: @Dheeraj : I think u should review the problem again. What u have posted is a way to find no. of set bits in a

Re: [algogeeks] C-Question

2011-08-21 Thread Puneet Chawla
Compiler is little endian so as u have typecasted it to char pointer then 0100 1010 1100 means 4 0 A C 0 0 0 0 it will show o/p byte by byte from LSB. On Sun, Aug 21, 2011 at 5:47 PM, Vijay Khandar vijaykhand...@gmail.comwrote: Thank u very much Abhishek for this link,

Re: [algogeeks] C-Question

2011-08-21 Thread Puneet Chawla
forgot to mention last byte 00 then 2nd last 00 and so on AC then 40 On Sun, Aug 21, 2011 at 6:00 PM, Puneet Chawla puneetchawla...@gmail.comwrote: Compiler is little endian so as u have typecasted it to char pointer then 0100 1010 1100 means 4 0 A C 0 0 0 0

Re: [algogeeks] c++

2011-08-21 Thread Puneet Chawla
/algogeeks?hl=en. -- With regards Puneet Chawla Computer Engineering Student NIT Kurukshetra -- 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

Re: [algogeeks] c++

2011-08-21 Thread Puneet Chawla
yeah thnx..:) On Sun, Aug 21, 2011 at 10:46 PM, Sanjay Rajpal srn...@gmail.com wrote: Depends on compiler . Return Value optimization : See the link : http://en.wikipedia.org/wiki/Return_value_optimization Sanju :) On Sun, Aug 21, 2011 at 10:11 AM, Puneet Chawla puneetchawla

[algogeeks]

2011-08-21 Thread Puneet Chawla
Which kinds of trees are best to use when we have less stack space (to avoid using stack space) (a) AVL Trees (b) Threaded Binary Tree (c) Red and Black Tree (d) Ordered Trees -- With regards Puneet Chawla Computer Engineering Student NIT Kurukshetra -- You received

Re: [algogeeks] c programe explain

2011-08-21 Thread Puneet Chawla
://groups.google.com/group/algogeeks?hl=en. -- With regards Puneet Chawla Computer Engineering Student NIT Kurukshetra -- 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

Re: [algogeeks] c programe explain

2011-08-21 Thread Puneet Chawla
. 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. -- With regards Puneet Chawla Computer Engineering Student NIT Kurukshetra -- You received

Re: [algogeeks] c programe explain

2011-08-21 Thread Puneet Chawla
We are converting const char* into char * here On Sun, Aug 21, 2011 at 10:55 PM, Puneet Chawla puneetchawla...@gmail.comwrote: how..??? On Sun, Aug 21, 2011 at 10:53 PM, Sanjay Rajpal srn...@gmail.com wrote: the o/p wil be Interview. Sanju :) On Sun, Aug 21, 2011 at 10:20 AM

Re: [algogeeks] c programe explain

2011-08-21 Thread Puneet Chawla
+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- With regards Puneet Chawla Computer Engineering Student NIT Kurukshetra -- You received this message because you are subscribed to the Google Groups Algorithm

Re: [algogeeks] c programe explain

2011-08-21 Thread Puneet Chawla
ohh srry.i didn't run it...sry again.. On Sun, Aug 21, 2011 at 10:58 PM, Sanjay Rajpal srn...@gmail.com wrote: it is a warning dear, not an error :) Sanju :) On Sun, Aug 21, 2011 at 10:27 AM, Puneet Chawla puneetchawla...@gmail.com wrote: okk tht i knew bt my point is We

Re: [algogeeks] question to code

2011-08-21 Thread Puneet Chawla
Puneet Chawla Computer Engineering Student NIT Kurukshetra -- 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

Re: [algogeeks] question to code

2011-08-21 Thread Puneet Chawla
(log m + log n + log p), where m, n,p are lengths of the arrays. Correct me if m wrong :) Sanju :) On Sun, Aug 21, 2011 at 10:34 AM, Puneet Chawla puneetchawla...@gmail.com wrote: Here by just applying merge on these array as they are sorted and calculate the middle element..Am i rt

Re: [algogeeks] c programe explain

2011-08-21 Thread Puneet Chawla
. Sanju :) On Sun, Aug 21, 2011 at 10:29 AM, Puneet Chawla puneetchawla...@gmail.com wrote: ohh srry.i didn't run it...sry again.. On Sun, Aug 21, 2011 at 10:58 PM, Sanjay Rajpal srn...@gmail.comwrote: it is a warning dear, not an error :) Sanju :) On Sun, Aug 21, 2011

Re: [algogeeks] question to code

2011-08-21 Thread Puneet Chawla
. when k becomes sum/2, this element will be middle element of the merged array. I think it could also be done in O(log m + log n + log p), where m, n,p are lengths of the arrays. Correct me if m wrong :) Sanju :) On Sun, Aug 21, 2011 at 10:34 AM, Puneet Chawla puneetchawla...@gmail.com

Re: [algogeeks] Syllogism

2011-08-20 Thread Puneet Chawla
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. -- With regards Puneet Chawla Computer Engineering Student NIT Kurukshetra -- You received this message because you

Re: [algogeeks] thanx...

2011-08-20 Thread Puneet Chawla
Puneet Chawla Computer Engineering Student NIT Kurukshetra -- 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

Re: [algogeeks] Adding Two numbers using bitwise operators only

2011-08-20 Thread Puneet Chawla
+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- With regards Puneet Chawla Computer Engineering Student NIT Kurukshetra -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Re: pls solve ...

2011-08-20 Thread Puneet Chawla
, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- With regards Puneet Chawla Computer Engineering Student NIT Kurukshetra -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email

[algogeeks]

2011-08-11 Thread Puneet Chawla
#define cube(x) (x)*(x)*(x) main() { int x=3,c; c=cube(++x); printf(%d,c); return 0; } will anyone please tell me why o/p is 150.? -- With regards Puneet Chawla -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group

Re: [algogeeks]

2011-08-11 Thread Puneet Chawla
, Puneet Chawla puneetchawla...@gmail.com wrote: #define cube(x) (x)*(x)*(x) main() { int x=3,c; c=cube(++x); printf(%d,c); return 0; } will anyone please tell me why o/p is 150.? -- With regards Puneet Chawla -- You received this message because you

Re: [algogeeks]

2011-08-11 Thread Puneet Chawla
the sequence points rule...plz corect me if im wrong... On Fri, Aug 12, 2011 at 12:48 AM, Puneet Chawla puneetchawla...@gmail.com wrote: In turbo compiler it's o/p is 216 and in dev it's 150.. Help me out.. On Fri, Aug 12, 2011 at 12:45 AM, sagar pareek sagarpar...@gmail.comwrote: after

Re: [algogeeks]

2011-08-11 Thread Puneet Chawla
, 2011 at 1:05 AM, Puneet Chawla puneetchawla...@gmail.com wrote: @Aditi i thnk sagar parteek is right ...in turbo compiler it's incrementing and finally max of all values and multiply the value means pre increment-evaluate-postincrement On Fri, Aug 12, 2011 at 1:02 AM, sagar pareek sagarpar

Re: [algogeeks] Re: Microsoft written!!!

2011-08-10 Thread Puneet Chawla
. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- With regards Puneet Chawla Computer Engineering Student NIT Kurukshetra -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group