this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from this group and stop receiving emails from it, send an
email to algogeeks+unsubscr...@googlegroups.com.
--
Rohit Jangid
http://rohitjangid.com
Graduate
Deptt. of Computer Engineering
NSIT
after few attempts I think you must be getting stuck where you need a^3 +
b^3 + c^3 value in terms of abc, C1, and C2 which is possible using this
identity--
(a+b+c)³=(a³+b³+c³)+3[(a+b+c)(ab+ac+bc)-abc]
refer this link for the proof
a very standard dp problem . try to formulate recurrence relation . it has
been mentioned a couple of times on stackoverflow as well .
On May 5, 2013 8:28 AM, sreekanth guru sreekanth.i...@gmail.com wrote:
There n stages of a game. At each stage i you will come across a devil.
Each devil has
.
To unsubscribe from this group and stop receiving emails from it, send an
email to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
Rohit Jangid
Graduate
Deptt. of Computer Engineering
NSIT, Delhi University, India
--
You
Sandeep
s.shubhamsand...@gmail.comwrote:
on my system every time o/p is 0
using ubuntu 10.04 ,gcc compiler
On Mon, Mar 4, 2013 at 7:34 AM, rohit jangid rohit.nsi...@gmail.comwrote:
output for me for the previous snippet
localhost:slingshot rohitjangid$ ./a.out
1799476872
1799474584
are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from this group and stop receiving emails from it, send an
email to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
Rohit Jangid
Graduate
Deptt. of Computer
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
Rohit Jangid
Graduate
Deptt. of Computer Engineering
NSIT, Delhi University, India
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group
On Mon, Mar 4, 2013 at 7:33 AM, rohit jangid rohit.nsi...@gmail.com wrote:
yeah true . one interesting thing I noticed is that if you run this code
#includestdio.h
int main()
{
int i = 0;
do {
printf (%d\n,(float)1);
}while(i++ 1);
return 0;
}
one would expect same
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.
--
Rohit Singhal
09211931609
--
You received
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
http://groups.google.com/group/algogeeks?hl=en.
--
Rohit Singhal
09211931609
--
You
remains same
On Sat, Oct 29, 2011 at 12:21 PM, praveen raj praveen0...@gmail.com wrote:
amount displaced by (boat +man + suitcase) = amount displaced by
(boat+man) + amount displaced by suitcase
therefore no change of level...
With regards,
Praveen Raj
DCE-IT 3rd yr
735993
Is anybody know about sapient working culture?
--
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
thanks every1 for their explanations especially vishwaas and anup
ghatage
--
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
int main()
{
int a=256;
char *p=a;
*++p=2;
printf(%d,a);
return(0);
}
--
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
isn't that simply because if little indian endian way of storing bytes in
memory
initial -- 0001 0..
finally-- 0010 0..
On Sep 22, 2011 5:38 PM, Rohit Upadhyaya mailtoroh...@gmail.com wrote:
int main()
{
int a=256;
char *p=a;
*++p=2;
printf(%d
got 45 on linux
than tried with fflush(stdout) and got 9 which is correct . so I guess that
both child and parent process getting the same buffer and thus resulting in
more number of hello
correct answer is 9 as already mentioned
On Sep 21, 2011 7:57 PM, sush57 sushaant...@gmail.com wrote:
Try This 1-:
#includestdio.h
#includestdlib.h
int main()
{
int w=10;
int *p=w;
int *x;
x=(int *)malloc(sizeof(int)*1);
*x=1000;
int *y;
y=(int *)malloc(sizeof(int));
*y=100;
printf(%d %d %d,*x,*p,*y);
return 0;
}
--
You received this message because you are subscribed to the Google
can any1 explain me the fork() function???
--
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 a 32 bit it is 4 ,3 and for 16 bit it is 2,3 and 64 bit it is 8,3..
also strlen(d) gives 3 bcz the coding of fn strlen() is such that as it
encounters null it will terminate..so irrespective of machine it prints 3 as
null at 4th place
--
You received this message because you are subscribed
=temp
l++;
r--;
}
}
Thanks Regards,
-Rohit
On Sat, Sep 10, 2011 at 5:24 PM, bharatkumar bagana
bagana.bharatku...@gmail.com wrote:
swap k elements form 1 to k and n-k to n respectively...
ex: k=3
temp=k;
int a[9]= {9,7,6,5,3,23,14,2,4} ; has become
This can also be done:
for( i=0; ik;i++)
{
b[i]=a[i];
}
for (;in;i++)
{
a[i-k]=a[i];
}
while((i-k)n)
{
a[i-k]=b[i];
}
But extra array is used here.
On Sat, Sep 10, 2011 at 5:30 PM, Rohit jalan jalanha...@gmail.com wrote:
How is this one ??
int a[9]={9,7,6,5,3,23,14,2,4}
n=9
@BharathKumar: extremely sorry dude .. will not do this again .. Can you
forgive me ? :p
On Sep 10, 2011 12:09 PM, bharatkumar bagana bagana.bharatku...@gmail.com
wrote:
@rohit : why don't u have a look at the older posts before replying some
thing ...ok .. I'm sorry if u are hurt ..
what
please explain ...
On Sat, Sep 10, 2011 at 5:10 PM, bharatkumar bagana
bagana.bharatku...@gmail.com wrote:
physical address:19 bits(10+9)
logical address : 15 bits(6+9)
On Sat, Sep 10, 2011 at 6:48 AM, ravi maggon maggonr...@gmail.com wrote:
we have page table having 64 entries of 10
How to find out Kth largest element in an array ?
--
Thanks Regards :
ROHIT JALAN
--
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
@Brijesh: Can you help me with a code ? or atleast pseudo code ? How are
you going to keep on inserting the elements ?
Thanks Regards,
-Rohit
On Thu, Sep 8, 2011 at 10:38 PM, Brijesh brijeshupadhyay...@gmail.comwrote:
make a max heap of size K , and keep inserting all the elements
http://www.personal.kent.edu/%7Ermuhamma/Algorithms/MyAlgorithms/Sorting/heapSort.htmfor
MH
b) Else ignore it.
O((n-k)*logk)
3) Finally, MH has k largest elements and root of the MH is the kth largest
element.
Thanks Regards,
-Rohit
On Thu, Sep 8, 2011 at 11:20 PM, praveen raj praveen0
.
--
Regards:
Rohit Singhal
--
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
of the initial failure in the placements(ended up
where i did not planed). I wish that wont happen with anybody.
Thank you,
Sid.
On Tue, Sep 6, 2011 at 2:19 PM, rahul vatsa vatsa.ra...@gmail.comwrote:
:D
may be u lost this to gt something better :-)
On Tue, Sep 6, 2011 at 4:32 AM, ROHIT SINGHAL
how many bytes are allocated by following code?
#includealloc.h
#define col 4
#define row 3
int main()
{
int(*p)[col];
p=(int(*)[col])malloc(row*sizeof(*p));
return 0;
}
please explain answer?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
Q1.
NODE* head //points to the bst(if it exists)
void exist_bst(NODE *tree)
{
if(tree != NULL)
{
if(tree-left-info tree-info tree-right-info = tree-info)
{
if(check(tree))
head = tree;
}
else
{
exist_bst(tree-left);
exist_bst(tree-right);
}
}
123456789
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/OsL6-Vp91qoJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from
None of us is right
https://ideone.com/KBVuM
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/mar0GJWGi5kJ.
To post to this group, send email to
while(--i 0) //suppose i = 1 here, so --i becomes 0, hence the condition
fails...so it will go 1 step back in recursion
{
main();
printf(%d,i);
}
it will execute
printf(%d,i) of prev recursion where i=0 now, so 0 gets printed...now
again the condition is checked i=0, thrfore --i becomes -1,
+1 to chris
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/fzTBEIWLGcAJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe
Where does a static variable get allocated in memory..?
Like automatic variables get stack, objects allocated through malloc/calloc
get memory from heap...wt abt static variable?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this
Someone please provide the recursion tree for it..thanks
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/_o5nQen8VmAJ.
To post to this group, send email to
:
ROHIT JALAN
B.E. Graduate,
Computer Science Department,
RVCE, Bangalore
--
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
Someone please share their recruitment procedure and the topics they focus
on..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/nJZwHH_s2j4J.
To post to
How to save a binary search tree space efficiently and built it
again , just tell any idea.
--
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
Why does the following code not give an error?
#includestdio.h
void fun(char *a) //array decays to pointer here
{
a[0] = 'a';
printf(%s\n,a);
}
int main()
{
char p[]=hello;
fun(p);
getch();
}
if i write something like this in main
char *arr=hello
arr[0] = 'r';
Thanks for your reply himanshu, ...I am aware of the above stated fact but
my doubt is that when i pass this char array to a function and accept it as
a char pointer (char *a), and then when write a[0] = 'a', why don't i get an
error?
--
You received this message because you are subscribed to
@kamakshi: your algo is wrong
Take the test case as {4,3,2,5,8,7}
op should be 16 (4,5,7) but ur op = 15
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
how is this program convert number to binary equivalent
int main()
{
unsigned int num =23 ;
int i;
for(i=0;i16;i++)
printf(%d\n,(numi115)?1:0);
}
please explain
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards:
Rohit Singhal
--
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
Please share Process and experience of tejas Network for software
profile.
Thanks
--
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
Is anybody have any idea about pattern of elitmus test , Is It a C
programming test or General aptitude test?
--
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
How to find the distance of a node from the root of the tree??
Give algorithm.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/hL50R3KOgGgJ.
To post to this
this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards:
Rohit Singhal
--
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
at 11:45 PM, rohit rajuljain...@gmail.com wrote:
Is anybody have any idea about pattern of elitmus test , Is It a C
programming test or General aptitude test?
--
You received this message because you are subscribed to the Google
Groups Algorithm Geeks group.
To post to this group, send
Most commonly used algo to detect a loop in a linked list is to have two
pointers running, one at double the speed of other and check if they
meet..What is the time complexity of this algorithm?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
no
some girls may not be beautiful or all of them may be beautiful
based on your premise the conclusion is incorrect since you havent spoken
about the rest of the girls so you dont know nething about them
On Mon, Aug 22, 2011 at 1:12 PM, Apoorve Mohan apoorvemo...@gmail.comwrote:
U cannot say
#includestdio.h
#define max(a,b) (ab?a:b)
int main()
{
int j=max(3+2,2+8);
printf(%d,j);
return 0;
}
why this program show output as 9 ? please help me
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group,
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Rohit Jangid
Under Graduate Student,
Deptt. of Computer Engineering
NSIT, Delhi University, India
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
Guys i m going to appear for ebay any question set or any kinda help for the
same
--
Regards:
Rohit Singhal
--
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
ebay job location- chennai
On Thu, Aug 18, 2011 at 11:28 PM, Swathi chukka.swa...@gmail.com wrote:
Is it ebay or paypal? Job location?
On Thu, Aug 18, 2011 at 11:26 PM, ROHIT SINGHAL rohitksingha...@gmail.com
wrote:
Guys i m going to appear for ebay any question set or any kinda help
@siva thanks bro for info.
@rahul thru Amcat so its offcampus tey given call to specific students
On Fri, Aug 19, 2011 at 1:12 AM, Rahul Tiwari rahultiwari6...@gmail.comwrote:
@rohit singhal
off-campus or on-campus ?
if on-campus ---mention ur college plz
--
Rahul Tiwari aka
+1 to nitin
On Wed, Aug 17, 2011 at 2:48 PM, Vijay Kansal vijaykans...@gmail.comwrote:
my bad 2^(n-1)...
On Aug 17, 2:17 pm, Vijay Kansal vijaykans...@gmail.com wrote:
@nitin it must be 2^n i think
On Aug 17, 3:48 am, Bharat Kul Ratan bharat.kra...@gmail.com wrote:
It
0.788
On Wed, Aug 17, 2011 at 5:23 PM, priya ramesh
love.for.programm...@gmail.com wrote:
A mistake from my side as well!
Got 78.8% :)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
+1 to nitin
On Wed, Aug 17, 2011 at 6:02 PM, Romil ... vamosro...@gmail.com wrote:
People this is not the way to approach this one. This question seems to be
unfair. Take the number to be 1939 which also leaves 69 as the remainder
when divided by 935 but when it is divided by 38, the
Please mail it to me also!!
On Aug 17, 2:22 pm, Sanjay Rajpal srn...@gmail.com wrote:
@Raman : mail kar de bhai abhi.
Sanjay Kumar
B.Tech Final Year
Department of Computer Engineering
National Institute of Technology Kurukshetra
Kurukshetra - 136119
Haryana, India
On Wed, Aug 17, 2011
logic plz?
On Wed, Aug 17, 2011 at 10:35 PM, sagar pareek sagarpar...@gmail.comwrote:
16, 61, 106 average speed is 45 miles/hour
On Wed, Aug 17, 2011 at 10:28 PM, priya ramesh
love.for.programm...@gmail.com wrote:
A car is traveling at a uniform speed.The driver sees a milestone showing
No third time he just say same digit are appearing but you write
interchanging .
correct me if i am wrong!
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
#includestdio.hconst char *fun();
int main()
{
char *ptr = fun();
return 0;
}const char *fun()
{
return Hello;
}
Why doesn't this code give error??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the
Can anyone give algorithm for non recursive preorder and postorder??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/CMDjAwgewoYJ.
To post to this group,
I came accross a problem where i need to hash strings..
What is the best way to hash strings??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/LlcN35L2Su8J.
Well I came across a great hashing algorithm, known as djb2 hash for hashing
strings..would like to share it:
int get_hash(char *s)
{
int hash = 0;
while(c = *s++)
{
hash = ((hash 5) + hash) ^ c;
}
return hash;
}
this can be done for each individual string to be hashed..
--
You received
Nice one..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/ShfCI3o9YY0J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from
@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.
--
Rohit Jangid
Under Graduate Student,
Deptt. of Computer Engineering
NSIT, Delhi University, India
2.
On Sat, Aug 13, 2011 at 7:24 PM, Raman raman.u...@gmail.com wrote:
Which of the following statements are correct about the below declarations?
*char *p = Sanjay;
char a[] = Sanjay;*1:There is no difference in the declarations and both
serve the same purpose.2:*p* is a non-const pointer
also 3,4
On Sat, Aug 13, 2011 at 7:30 PM, Rohit Srivastava access2ro...@gmail.comwrote:
2.
On Sat, Aug 13, 2011 at 7:24 PM, Raman raman.u...@gmail.com wrote:
Which of the following statements are correct about the below
declarations?
*char *p = Sanjay;
char a[] = Sanjay;* 1
my bad only 3,4
On Sat, Aug 13, 2011 at 7:41 PM, rajeev bharshetty rajeevr...@gmail.comwrote:
3,4
On Sat, Aug 13, 2011 at 7:39 PM, Raman raman.u...@gmail.com wrote:
In statement 2, isn't p pointing to const string, as we cannot modify the
characters of the string.
--
You received this
I can only say that above code is wrong, check this code of mine, I
have tested more cases and all are working,
https://ideone.com/pEBs8
see if you can find any bug in this one .
thanks.
On Sat, Aug 13, 2011 at 8:03 PM, WgpShashank shashank7andr...@gmail.com wrote:
@rohit , I think we will get
ok check this, https://ideone.com/hZboG
there may be bugs in coding, but I'm quite sure that algo is correct
need to check more cases though
but working on all the cases discussed here
is there any proof that greedy won't work in this case?
On Sat, Aug 13, 2011 at 11:03 PM, rohit jangid rohit.nsi
int main()
{
int a[5]={1,2,3,4,5};
printf(%d,a[4]-a[0])
}
why it show 4 not 16?
--
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
in memory.
Similarly,pointer subtraction will give the difference in indexes and not
the memory addresses.
If you try subtracting an integer pointer and a float pointer, it will be an
error.
On Fri, Aug 12, 2011 at 11:34 AM, rohit rajuljain...@gmail.com wrote:
int main()
{
int a[5
at
http://groups.google.com/group/algogeeks?hl=en.
--
Rohit Jangid
Under Graduate Student,
Deptt. of Computer Engineering
NSIT, Delhi University, India
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
main()
{
int m,n;
m=3+max(2,3);
n=2*max(3,2);
printf(“%d,%d”,m,n);
}
ans:-m=2,n=3
why output is this???
--
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
#includestdio.h
#includeconio.h
int main()
{
struct value
{
int bit1:1;
int bit3:4;
int bit4:4;
}bit={1,2,2};
printf(%d %d %d\n,bit.bit1,bit.bit3,bit.bit4);
getche();
return 0;
}
the above code gives output : -1 2 2
any idea why???
--
You
, output will be -2
2) unsigned int bit3:2, output will be 2.
I hope it is cleared now
On 8/9/11, Rohit Srivastava access2ro...@gmail.com wrote:
#includestdio.h
#includeconio.h
int main()
{
struct value
{
int bit1:1;
int bit3:4;
int bit4:4
@aditi did they mention any thing about miss penalty also in the question ??
On Tue, Aug 9, 2011 at 11:48 AM, aditi garg aditi.garg.6...@gmail.comwrote:
@aditya and dipankar: the ans given ws 500ns that is why i posted dis
ques...i ws getting the same ans...
On Tue, Aug 9, 2011 at 9:45 AM,
, Rohit Srivastava
access2ro...@gmail.comwrote:
@aditi did they mention any thing about miss penalty also in the question
??
On Tue, Aug 9, 2011 at 11:48 AM, aditi gayrg
aditi.garg.6...@gmail.comwrote:
@aditya and dipankar: the ans given ws 500ns that is why i posted dis
ques...i ws
@aditi
For the first question.
The answer will be ((0.97 *2) + (0.03*2) +(0.03*100)) i.e 5 ns.
The reason is that cache is accessed in the case of miss as well, so
we need to include that time as well.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
typecast only temporarily changes the pointer type of LHS but cannot change
that of RHS or even LHS permanently
On Tue, Aug 9, 2011 at 5:36 PM, ankit sambyal ankitsamb...@gmail.comwrote:
The typecasting tells the compiler that the void pointer is now pointing to
an integer and when we use this
In memory heirachy, whenever some data is to be read, first data is to
be searched in M1, if the data is found in M1 then system returns the
value from there and counted as a hit. If the value is not found in
M1 i.e. Miss for M1 then it accesses M2 and returns the value from
there. Since nothing
@aditi since in the hierarchy m1 comes first so if it is a hit then we dont
need to check m2 but in case of a miss 0.03*2 seconds are wasted while
searching in m1 then that value is looked for in m2
so i suppose the best answer is given by rohit jain. unless there is some
missing data
On Tue, Aug
google on RLE (run length encoding) its almost similar!!
On Tue, Aug 9, 2011 at 6:46 PM, ankit sambyal ankitsamb...@gmail.comwrote:
@raghavan: ur approach uses O(n) space
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
it will give error in line 3 because nodeptr is undefined till that point..
On Aug 9, 2011 8:03 PM, programming love love.for.programm...@gmail.com
wrote:
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
yep it will !!
any ways nodeptr is another name for pointer to the same structure so you
dont need to write structname *nodeptr
you can simply write nodeptr *p(say) to declare pointer to the structure
On Tue, Aug 9, 2011 at 8:09 PM, rohit jangid rohit.nsi...@gmail.com wrote:
it will give error
dont use *h just use h
On Tue, Aug 9, 2011 at 8:31 PM, siddharth srivastava akssps...@gmail.comwrote:
Hi
On 9 August 2011 20:26, programming love
love.for.programm...@gmail.comwrote:
#includestdio.htypedef struct {char * a;
}*nodeptr;
main(){nodeptr *h;h-a=programming;printf(hi %s\n,
will nodeptr stand
for?
On Tue, Aug 9, 2011 at 8:09 PM, rohit jangid rohit.nsi...@gmail.com
wrote:
it will give error in line 3 because nodeptr is undefined till that
point..
On Aug 9, 2011 8:03 PM, programming love
love.for.programm...@gmail.com
wrote:
--
You received this message because you
when you declared h it contains garbage address . h-a is meaningless .
read pointers chapter from K nd R for full details about pointers in C .
On Aug 9, 2011 9:11 PM, programming love love.for.programm...@gmail.com
wrote:
#includestdio.htypedef struct {char * a;
}*nodeptr;
main(){nodeptr
What will the following code snippet do, when is it passed the root of
a binary tree ?
func( Node *node){
if(node-right != NULL)
func( node-right);
if(node-left != NULL)
func( node-left);
if( node-left == NULL node-right == NULL )
delete(node);
}
Pick choice
options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Rohit Jangid
Under Graduate Student,
Deptt. of Computer Engineering
NSIT, Delhi University, India
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
int get_power(int a, int b)
{
if(!b)
return 1;
if(b%2)
return a * get_power(a, b/2);
return get_power(a, b/2);
}
int func(int p)
{ int sum = 0;
for(int i = 1; i = p; ++i)
{
sum += get_power(i, 5);
}
return sum;
}
--
You received this message because you are subscribed to the Google Groups
...@gmail.com wrote:
Well actually there are about 1000 values to be stored, but the value
itself
is small(url of a website..).. i think it should not be a major
bottleneck..
Thanks,
Priyanshu
On Mon, Aug 8, 2011 at 2:39 PM, rohit jangid rohit.nsi...@gmail.com
wrote:
javaScript's array are just
use a linked list to store child nodes, a tree node will hold pointer
to next sibling and a pointer to its first child.
typedef struct TreeNode{
struct TreeNode * nextSibling;
struct TreeNode * fistChild;
//rest things
}
On Aug 6, 4:10 pm, Aman Goyal aman.goya...@gmail.com wrote:
Can anyone
you might get error: floating pointing formats not linked!!
but thats obsolete! I don't compiler these days will give such an error
otherwise code written by Dipankar will solve ur problem if u r unable to
take multi-word input
On Fri, Aug 5, 2011 at 7:24 PM, Dipankar Patro dip10c...@gmail.com
which compiler are u using
?
On Fri, Aug 5, 2011 at 7:29 PM, Vijay Khandar vijaykhand...@gmail.comwrote:
I include this fn linkfloat(), Now my program working properlybut
why we have to include this fn externally plz explain.
On Fri, Aug 5, 2011 at 6:07 PM, SANDEEP CHUGH
compiler Turbo C++
On Fri, Aug 5, 2011 at 7:34 PM, Rohit Srivastava
access2ro...@gmail.comwrote:
you might get error: floating pointing formats not linked!!
but thats obsolete! I don't compiler these days will give such an error
otherwise code written by Dipankar will solve ur problem if u r
/algogeeks?hl=en.
--
Regards :
ROHIT JALAN
B.E. Graduate,
Computer Science Department,
RVCE, Bangalore
--
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
1 - 100 of 317 matches
Mail list logo