[algogeeks] AMAZON: given col id, print col name in excel
Imagine a sequence like this: a, b, c...z, aa, ab, ac...zz, aaa, aab, aac aax, aaz, aba, abc... (Its same as excel column names). Given an integer (n), generate n-th string from the above sequence. Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: AMAZON: given col id, print col name in excel
this is similar to conversion of no in base 26.( where digits are a,b,c,d...z) just think it like decimal to binary conversion here base is instead 26. char Carr[26]={a,b,c...z} i=0; int arr[]; do { arrr[i++]=n%26; n/=2; } while(n) ; for(int i=n-1;i=0;i--) coutCarr[a[i]]; correct me if i am wrong. On Wednesday, 8 August 2012 12:56:56 UTC+5:30, ashgoel wrote: Imagine a sequence like this: a, b, c...z, aa, ab, ac...zz, aaa, aab, aac aax, aaz, aba, abc... (Its same as excel column names). Given an integer (n), generate n-th string from the above sequence. Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 -- 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/-/Z3kYiTZi_F8J. 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.
[algogeeks] Yahoo
Has anyone appeared for Yahoo recentlyplz tell the pattern of the paper -- 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/-/HL1OrE0BzxYJ. 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.
[algogeeks] what is priority inversion ?
i just read about priority inversion , how does it take place ? i read it in Galvin , it wasnt clear there. -- 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/-/5aVHrwEsiewJ. 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.
Re: [algogeeks] converting binary tree to BST
@Navin By your algo of starting with the middle node,I guess a balanced BST would be created. Is it ? On Wed, Aug 8, 2012 at 1:24 AM, Navin Kumar algorithm.i...@gmail.comwrote: 1. Convert your Binary tree into doubly linked list. 2. Sort the linked list using merge sort 3. Build BST using doubly linked list by each time selecting middle node and recursively calling left part of linked list and right part of linked list. On Tue, Aug 7, 2012 at 10:23 PM, vaibhav shukla vaibhav200...@gmail.comwrote: Hi all The problem is to convert a binary tree into Binary Search Tree My approach was : 1. Store the Inorder traversal of BT in an array. 2. Sort the array in ascending order. 3. Again do inorder traversal and write the Node's data from array one by one. This approach takes O(n) extra space. Can someone tell a better approach that doesn't require any extra space. Thanx. -- best wishes!! Vaibhav -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] what is priority inversion ?
Read Mar's PathFinder Case Failure It would illustrate it .. Infact the case was observed first on PathFinder Mission itself. On Wed, Aug 8, 2012 at 4:41 AM, Hraday Sharma hradaysha...@gmail.comwrote: i just read about priority inversion , how does it take place ? i read it in Galvin , it wasnt clear there. -- 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/-/5aVHrwEsiewJ. 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. -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] converting binary tree to BST
@vaibhav : yes it will be a balanced BST. On Wed, Aug 8, 2012 at 11:29 AM, vaibhav shukla vaibhav200...@gmail.comwrote: @Navin By your algo of starting with the middle node,I guess a balanced BST would be created. Is it ? On Wed, Aug 8, 2012 at 1:24 AM, Navin Kumar algorithm.i...@gmail.comwrote: 1. Convert your Binary tree into doubly linked list. 2. Sort the linked list using merge sort 3. Build BST using doubly linked list by each time selecting middle node and recursively calling left part of linked list and right part of linked list. On Tue, Aug 7, 2012 at 10:23 PM, vaibhav shukla vaibhav200...@gmail.comwrote: Hi all The problem is to convert a binary tree into Binary Search Tree My approach was : 1. Store the Inorder traversal of BT in an array. 2. Sort the array in ascending order. 3. Again do inorder traversal and write the Node's data from array one by one. This approach takes O(n) extra space. Can someone tell a better approach that doesn't require any extra space. Thanx. -- best wishes!! Vaibhav -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: [Amazon] : constructing fully binary tree
in one special case of binary tree where each internal node has 2 children; we can construct binary tree from these pre and postorder traversals. On Wed, Aug 8, 2012 at 12:11 PM, Navin Kumar algorithm.i...@gmail.comwrote: @shiv narayan: we are not going to create exact tree as original. You have to build full binary tree where as original tree may / may not be full binary tree. On Wed, Aug 8, 2012 at 2:31 AM, shiv narayan narayan.shiv...@gmail.comwrote: Preorder and postorder do not uniquely define a binary tree. so question is vague . On Sunday, 15 July 2012 01:41:15 UTC+5:30, Navin Kumar wrote: Given Preorder and postorder traversals of a tree. Device an algorithm to constuct a fully binary tree from these traversals. -- 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/-/xaHfTySoo58J. 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. -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] oracle paper pattern.......................
Has anyone appeared for Yahoo recentlyplz tell the pattern of the paper -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Oracle paper pattern
Has anyone appeared for oracle recentlyplz tell the pattern of the paper -- 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/-/IhEwqKaWLmAJ. 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.
Re: [algogeeks] converting binary tree to BST
For a balanced tree , use either DLL or array ; same thing . On Wed, Aug 8, 2012 at 10:29 PM, Navin Kumar algorithm.i...@gmail.comwrote: @vaibhav : yes it will be a balanced BST. On Wed, Aug 8, 2012 at 11:29 AM, vaibhav shukla vaibhav200...@gmail.comwrote: @Navin By your algo of starting with the middle node,I guess a balanced BST would be created. Is it ? On Wed, Aug 8, 2012 at 1:24 AM, Navin Kumar algorithm.i...@gmail.comwrote: 1. Convert your Binary tree into doubly linked list. 2. Sort the linked list using merge sort 3. Build BST using doubly linked list by each time selecting middle node and recursively calling left part of linked list and right part of linked list. On Tue, Aug 7, 2012 at 10:23 PM, vaibhav shukla vaibhav200...@gmail.com wrote: Hi all The problem is to convert a binary tree into Binary Search Tree My approach was : 1. Store the Inorder traversal of BT in an array. 2. Sort the array in ascending order. 3. Again do inorder traversal and write the Node's data from array one by one. This approach takes O(n) extra space. Can someone tell a better approach that doesn't require any extra space. Thanx. -- best wishes!! Vaibhav -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- - - - - - - - - - - - - With Regards Daksh Talwar -- 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, visit this group at http://groups.google.com/group/algogeeks?hl=en.