Algorithm Geeks group.
To unsubscribe from this group and stop receiving emails from it, send an
email to algogeeks+unsubscr...@googlegroups.com.
--
---jatin
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from this group
was thinking that we can make a BST and and inorder traversal(both using
abs values) o(n) though will take log(n) space.
On Friday, 27 July 2012 15:35:24 UTC+5:30, Navin Kumar wrote:
Given array of integers (0 or +ve or -ve value) find two elements having
minimum difference in their absolute
Implementation/Definition of malloc(),realloc() in alloc.h . any idea on
how is it working? thanks.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
has been answered by Me.. Long back.. Check the thread..
On Thu, Jul 26, 2012 at 8:47 PM, jatin jatinseth...@gmail.com wrote:
Implementation/Definition of malloc(),realloc() in alloc.h . any idea
on how is it working? thanks.
--
You received this message because you are subscribed
anybdy has basic trie implementation (insertion and printing) ?
o/p
1)
main()
{
char *p1=Name;
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf(%s\n,p2);
} ...it's giving me empty string
2)
i=5;
printf(%d,i++ * i++);
o/p and also tell the reason?
--
You received this message
On Wednesday, 25 July 2012 20:20:02 UTC+5:30, jatin wrote:
anybdy has basic trie implementation (insertion and printing) ?
o/p
1)
main()
{
char *p1=Name;
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf(%s\n,p2);
} ...it's giving me empty string
2)
i=5;
printf(%d,i
For the first o/p even though i save it like u have done then too it's
showing me an empty string .
for 2nd as Vindya has stated it should give me error but my compiler is
showing me 30 as it's output(the ans shd be 25 if not error) ?
On Wednesday, 25 July 2012 20:42:56 UTC+5:30,
On Wednesday, 25 July 2012 20:59:47 UTC+5:30, jatin wrote:
For the first o/p even though i save it like u have done then too it's
showing me an empty string .
for 2nd as Vindya has stated it should give me error but my compiler is
showing me 30 as it's output(the ans shd be 25
Trie ??if u have it to mail kardio...
On Wednesday, 25 July 2012 21:10:55 UTC+5:30, deepikaanand wrote:
@ jatin
then there is something wrong I executed d same prog which I have pasted
here...it was giving me the correct answer and for the second qs has no
absolute answer it depends
ya that's right :( any other solution..
On Saturday, 14 July 2012 03:24:41 UTC+5:30, Dave wrote:
@Jatin: Take the array {1, 2, 4, 8, ..., x, 2, 4, 8, ..., x, x}, where x
is the largest power of two that will fit in your integer data type. Here 1
occurs once, 2, 4, 8, ... each occur twice
Or we can make a BST from array list in o(n)
then traverse it inorder-o(logn)
but this solution requires o(logn) space though.
On Friday, 13 July 2012 13:16:50 UTC+5:30, jatin sethi wrote:
1)Find product of the array and store it in say prod o(n) and o(1)
2)now traverse
@googlegroups.com
Subject: Re: [algogeeks] Re: Amazon Interview Question
@adarsh
But i think jatin has asked to check for the number( we achieved in step
1) occuring thrice or not..and in this check 27 will rule out.but i doubt
the algo given by Jatin runs in O(n) time. please comment.
On Fri
char str[5] , *p , str1[]=tatapower;
p=str1
while(*p)
{
if(*p=='t'||*p=='a')
if(str==NULL)
strcpy(str,*p);
else
strcat(str,*p);
p++;
}
On Tuesday, 10 July 2012 16:15:16 UTC+5:30, amrit harry wrote:
--
You received this message because you are subscribed to the Google Groups
for complete tree tree at last level can have left child and no right
child , thus condition shd be somewhat like this...
if(node[right]==NULLnode[left]==NULL)
return true;
if(node[right]!=NULL) // if the node Rchild!=NULL then there shd be Lchild
present.
if(node[left]==NULL)
14 matches
Mail list logo