sameer.muthu9
BAN USER@krishna : Can u please post the correct solution in O(n) time and O(1) space pls....
- sameer.muthu9 June 18, 2011Travesre the Tree in Inorder and store the elements and the corresponding pointers to nodes in a tree in an array in O(n) time........Then the code as follows
void fun(int arr[,int sum,int *a,int*b)
for(int i=0;i<n;i++)
for(int j=i;j<n;j++)
{
if(a[i]+a[j]==sum)
{
*a=i;
*b=j;
exit(0);
}
}
Shared memory
Message ques
semaphores(along with shared memory)
Replovercast172, Analyst at ADP
I am working as Human Resources Associates, and my duties are for obtaining, recording, and interpreting human resources information within ...
RepLisaNoto, Android Engineer at ADP
Annie has nearly 10 years of experience working on anadromous and estuarine fishery issues in California. She serves as a ...
Repaleasebkern, Personnel
Plant operators manage all things in an industrial plant or a power plant . They are supervising all the work . For ...
Repabig8485, Apple Phone Number available 24/7 for our Customers at ABC TECH SUPPORT
Hello, I'm Abigail and I'm from Hugo City. I maintain customer loyalty and keep a diverse group of ...
This is much more efficient and less comparisons than any of the above solutions
- sameer.muthu9 June 25, 2011