Re: [algogeeks] If anyone have this book please mail me Thanks in advance

2011-05-03 Thread Priyanka Chatterjee
e 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. > -- Thanks & Regards, Priyanka Chatterjee Final Year Undergraduate Student, Computer Science & Engineering, Nati

Re: [algogeeks] Re: Amazon Question

2011-01-26 Thread Priyanka Chatterjee
; For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Thanks & Regards, Priyanka Chatterjee Final Year Undergraduate Student, Computer Science & Engineering, National Institute Of Technology,Durgapur India http://priyanka-nit.blogspot.com/ --

Re: [algogeeks] post and pre increment operators

2011-01-08 Thread Priyanka Chatterjee
gt;> 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. >>>>> >>>

Re: [algogeeks] Re: post and pre increment operators

2011-01-08 Thread Priyanka Chatterjee
ks" group. > To post to this group, send email to algoge...@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. > -- Th

Re: [algogeeks] Re: Minimum Triplet Distance

2010-12-22 Thread Priyanka Chatterjee
...@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. > > -- Thanks & Regards, Priyanka Chatterjee Final Year Undergradua

[algogeeks] Re: uva toolkit

2010-09-13 Thread Priyanka Chatterjee
sorry please discard the above mail On 13 September 2010 21:11, Priyanka Chatterjee wrote: > > http://xrds.acm.org/ > > http://www.comp.nus.edu.sg/~stevenha/programming/acmoj.html > http://www.uvatoolkit.com/problemssolve.php > > Thanks & Regards, > Priyanka Chatterje

[algogeeks] uva toolkit

2010-09-13 Thread Priyanka Chatterjee
http://xrds.acm.org/ http://www.comp.nus.edu.sg/~stevenha/programming/acmoj.html http://www.uvatoolkit.com/problemssolve.php Thanks & Regards, Priyanka Chatterjee Final Year Undergraduate Student, Computer Science & Engineering, National Institute Of Technology,Durgapur India http://

Re: [algogeeks] Help with Increment Operators in C!

2010-08-28 Thread Priyanka Chatterjee
bscribe 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. > > -- Thanks & Regards, Priyanka Chatterjee Final Year Undergraduate Student, Computer Scien

Re: [algogeeks] BST Problem

2010-08-08 Thread Priyanka Chatterjee
find the given sum. -- Thanks & Regards, Priyanka Chatterjee Final Year Undergraduate Student, Computer Science & Engineering, National Institute Of Technology,Durgapur India http://priyanka-nit.blogspot.com/ -- You received this message because you are subscribed to the Google Group

Re: [algogeeks] Find the duplicate

2010-08-06 Thread Priyanka Chatterjee
@Algoboy , its pretty difficult to find the duplicate in constant space unless u mention the range of numbers. Do the numbers lie between [1,n] ??? Unless some other information is given i don't think it is possible to come out with a proper solution. > -- Thanks & Regar

Re: [algogeeks] BST Problem

2010-08-06 Thread Priyanka Chatterjee
o DLL is a simple algo, already discussed) T(n)=O(n) , S(n) =O(1). The only problem is you change the structure . (There probably exists a working algo to convert a DLL to BST , i haven't tried that yet although) -- Thanks & Regards, Priyanka Chatterjee Final Year Undergraduat

Re: [algogeeks] Amazon Placement Question

2010-07-31 Thread Priyanka Chatterjee
ve from your queue do connect these nodes till your >>> count. You may need to use one more temp variable to not to lose the >>> previous level node count when you compute the next level node count. >>> Repeat the same for all the level. >>> >>> RK >>&g

Re: [algogeeks] Amazon Placement Question

2010-07-29 Thread Priyanka Chatterjee
On 30 July 2010 02:59, Priyanka Chatterjee wrote: > Algo: 1. find height of tree > 2. do level order traversal > i> at each level store the address of each tree node in the > data part of a linked node and form linked list of the nodes > ii>

Re: [algogeeks] Amazon Placement Question

2010-07-29 Thread Priyanka Chatterjee
gt;next=levelOrderTraversal(root->right,level-1); } return ptr; } struct linkNode * createLinkNode(struct node * root){ struct linkNode* newNode=(struct linkNode*) malloc(sizeof(struct linkNode)); newNode->data=root; newNode->next=NULL; } -- Thanks & Regards, Priyanka Cha

Re: [algogeeks] Find The Kth min in a binary search tree

2010-07-25 Thread Priyanka Chatterjee
void kSmallestBST(struct node * root,int k){ static int count=0; if(!root) return; kSmallestBST(root->left,k); if(++count==k) {cout<data; return;} kSmallestBST(root->right,k); } -- Thanks & Regards, Priyanka Chatterjee Final Year Undergraduate Student, Computer Science

Re: [algogeeks] Re: BST

2010-07-24 Thread Priyanka Chatterjee
tr2-> data ) ptr1= ptr1->next; > else if ((ptr1->data + ptr2-> data ) == k){ > print_data_of_ptr1_and_ptr2; > ptr2= ptr2->prev; > ptr1= ptr1->next; > } > } > > > the 2nd step will take O(n) time.No

[algogeeks] Re: BST

2010-07-23 Thread Priyanka Chatterjee
and O(1) space. > > > -- > Thanks & Regards, > Priyanka Chatterjee > Final Year Undergraduate Student, > Computer Science & Engineering, > National Institute Of Technology,Durgapur > India > http://priyanka-nit.blogspot.com/ > -- You received this message because y

[algogeeks] BST

2010-07-23 Thread Priyanka Chatterjee
ards, Priyanka Chatterjee Final Year Undergraduate Student, Computer Science & Engineering, National Institute Of Technology,Durgapur India http://priyanka-nit.blogspot.com/ -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To

Re: [algogeeks] Re: adobe problem---array

2010-07-08 Thread Priyanka Chatterjee
> > @Anand- your code wont work for the test case {1,1,1,2} > Although few trivial test cases it could crack but the boundary ones failed. Can you please explain what exactly you tried to do , your algorithm is not clear. -- Thanks & Regards, Priyanka Chatterjee Final Year

Re: [algogeeks] microsoft.

2010-07-08 Thread Priyanka Chatterjee
; > to be honest, i hate to ask or be asked such question in interviews :) > > Best Regards > Ashish Goel > "Think positive and find fuel in failure" > +919985813081 > +919966006652 > > > On Thu, Jul 8, 2010 at 9:53 PM, Priyanka Chatterjee > wrote: > &g

Re: [algogeeks] Re: adobe problem---array

2010-07-08 Thread Priyanka Chatterjee
solution? What if our target? >>> >>> If a solution is required simple, then as mentioned by Satya, sort the >>> numbers in O(nlogn) time and scan once in O(n) time. So we get the >>> number repeated 3 times in O(nlogn) time and O(1) space. >>> >

Re: [algogeeks] microsoft.

2010-07-08 Thread Priyanka Chatterjee
ish Goel > "Think positive and find fuel in failure" > +919985813081 > +919966006652 > > > On Thu, Jul 8, 2010 at 1:32 PM, Priyanka Chatterjee > wrote: > >> >> >> I totally agree with Umesh's algo which gives O(K+1) time and an inplace >> solution

Re: [algogeeks] microsoft.

2010-07-08 Thread Priyanka Chatterjee
I totally agree with Umesh's algo which gives O(K+1) time and an inplace solution. The only point is the first K+1 numbers may get negated and the array is modified. In that case after finding the duplicate we can traverse the array again for the first k+1 no.s and make the negative numbers positiv

Re: [algogeeks] adobe problem---array

2010-07-07 Thread Priyanka Chatterjee
y fails if more than one no. repeats once. Thanks & Regards, Priyanka Chatterjee Final Year Undergraduate Student, Computer Science & Engineering, National Institute Of Technology,Durgapur India http://priyanka-nit.blogspot.com/ -- You received this message because you are subscribed to

Re: [algogeeks] adobe problem---array

2010-07-07 Thread Priyanka Chatterjee
3 gives the corresponding no. repeating thrice. -O(N) > > Time complexity is O(N+M) . Linear > space complexity is O(M) to store binary form. > > But this algo certainly fails if more than one no. repeats once. > > > -- Thanks & Regards, Priyanka Chatterjee Final Year U

Re: [algogeeks] Re: Need help

2010-07-07 Thread Priyanka Chatterjee
Firstly it is srm 475, the following link has the problem http://www.topcoder.com/stat?c=problem_statement&pm=10878&rd=14156 @crazysaikat : Sorry for misconstruing you. As this group is public it is better not to post problems of a srm while it is running. Apart from discussing it here, if you nee

Re: [algogeeks] Need help

2010-07-06 Thread Priyanka Chatterjee
t; > "WWB" > 2 > Returns: 1. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group

Re: [algogeeks] addition using bitwise

2010-07-01 Thread Priyanka Chatterjee
Algorithm Geeks" group. > To post to this group, send email to algoge...@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. >

Re: [algogeeks] addition using bitwise

2010-06-30 Thread Priyanka Chatterjee
are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > ht

Re: [algogeeks] addition using bitwise

2010-06-30 Thread Priyanka Chatterjee
s.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. > > -- Thanks & Regards, Priyanka Chatterjee Final Year Undergraduate Student, Co

Re: [algogeeks] addition using bitwise

2010-06-29 Thread Priyanka Chatterjee
On 29 June 2010 20:31, Priyanka Chatterjee wrote: > > > >> int add(int a, int b) >> { >> do >> { >> a=a^b;// sum without carry >> b=((a^b)&b)<<1;// carry without addition >&g

Re: [algogeeks] addition using bitwise

2010-06-29 Thread Priyanka Chatterjee
nd b are different. so this is clearly XOR operation 2. if we want carry only , then bit[k]=1 in result only if bit[k-1]=1 in both a and b => (1 &1)<<1=10 , so this operation is AND followed by LEFT SHIFT. 3. finally the loop ends when b=0 => iterate until nothing to carry

Re: [algogeeks] unique number in an array

2010-06-15 Thread Priyanka Chatterjee
XOR all the elements of array, the remaining value is the required unique number. (XORing two same numbers results in zero) > > -- Thanks & Regards, Priyanka Chatterjee Third Year Undergraduate Student, Computer Science & Engineering, National Institute Of Technology,Durga

Re: [algogeeks] First k smallest elements

2010-04-13 Thread Priyanka Chatterjee
t;>>>> Also you might like to refer to Red Black Trees in CLRS that >>>>>>>> chapter explains rotations. >>>>>>>> >>>>>>>> -- >>>>>>>> Rohi

Re: [algogeeks] First k smallest elements

2010-04-11 Thread Priyanka Chatterjee
roups.com >>>>>> . >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/algogeeks?hl=en. >>>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribe

Re: [algogeeks] First k smallest elements

2010-04-11 Thread Priyanka Chatterjee
ng IIT Bombay http://www.cse.iitb.ac.in/~rohitfeb14<http://www.cse.iitb.ac.in/%7Erohitfeb14> On Sun, Apr 11, 2010 at 11:00 AM, Priyanka Chatterjee wrote: > >> >> >> On 11 April 2010 10:46, Rohit Saraf wrote: >> >>> Construct a binary tree from the dat

Re: [algogeeks] First k smallest elements

2010-04-11 Thread Priyanka Chatterjee
gorithm Geeks" group. >>>> To post to this group, send email to algoge...@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> algogeeks+unsubscr...@googlegroups.com >>>> . >>>> For more options, visit this group at

Re: [algogeeks]

2010-03-31 Thread Priyanka Chatterjee
then binary search for x1 and x2 in O(logn) will be less efficient than the simple solution of O(n). Think on the data structure that can optimize it. Is it possible in time complexity < O(n)? > > -- Thanks & Regards, Priyanka Chatterjee Third Year Undergraduate Student, Com

[algogeeks]

2010-03-30 Thread Priyanka Chatterjee
Design an efficient algorithm to report all the points within x1 and x2 from a list of N integers. What data structure will you use to implement this algorithm? Find the order of complexity . ( An O(N) solution is not asked) -- Thanks & Regards, Priyanka Chatterjee Third Year Undergrad

Re: [algogeeks] First k smallest elements

2010-03-28 Thread Priyanka Chatterjee
in the worst case? > > On Sun, Mar 28, 2010 at 11:33 AM, Priyanka Chatterjee > wrote: > >> Design the most efficient algorithm to find the first k smallest elements >> in an array ? >> >> -- >> Thanks & Regards, >> Priyanka Chatterjee >&g

[algogeeks] First k smallest elements

2010-03-27 Thread Priyanka Chatterjee
Design the most efficient algorithm to find the first k smallest elements in an array ? -- Thanks & Regards, Priyanka Chatterjee Third Year Undergraduate Student, Computer Science & Engineering, National Institute Of Technology,Durgapur India http://priyanka-nit.blogspot.com/ -- You

Re: [algogeeks] Interview question.Provide the solution as per the constraints.

2010-03-08 Thread Priyanka Chatterjee
age because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com >> . >> For mor