[algogeeks] Re: Puzzle
My crazy guess is that you need to add 1900 and then these are important years. Maybe years when a team won some sports championship? I'm getting this from the "no math or outside knowledge." You need inside knowledge. On Feb 27, 8:24 am, karthikeya s wrote: > 3, 39, 41, 43, 45, 49, 51, 53, 55, 64, ?, ?, ... > (These are successive numbers sharing a common property. No math or > outside knowledge is needed.) -- 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: thanx to all
Congrats to Ravi Ranjan. But note you can figure out what's on the recursion stack at any time (for example in a graph search) by adopting a different coding style. Here is a simple example. // binary tree nodes typedef struct node { struct node *left, *right; int key; }; // search stack frame typedef struct stack_frame { struct stack_frame *caller; struct node *tree; // Any other args or local vars to be accessed within stack go here. }; // Do an in-order search of the whole tree. We don't // care about accessing the search key within the stack, so // it's not included in the struct above. But it could be. void search(stack_frame *args, int search_key) { // Empty tree case. if (args->tree == NULL) return; // Set up stack frame for recursive calls with pointer to caller's frame. stack_frame call_args[1] = {{ args->caller }}; // Check the left subtree call_args->tree = args->tree->left; search(call_args, key); // See if key matches. If so, print stack frame. if (args->tree->key == search_key) { printf("Nodes from key match up to root:\n"); for (struct stack_frame *p = args; p; p = p->caller) printf("Node %p with key %d\n", p->tree, p->tree->key); } // Now check the right subtree. call_args->tree = args->tree->right; search(call_args, key); } Cheers! On Mar 1, 11:49 am, atul anand wrote: > @Ravi : yeah dere is..and it was discussed before on this group.. > > check out this link :- > check soln by Lucifier.. > > http://groups.google.com/group/algogeeks/browse_thread/thread/9bbdd33... > > > > > > > > On Thu, Mar 1, 2012 at 9:18 PM, Ravi Ranjan wrote: > > @atul > > > two nodes were given in the qstn... > > > i did > > > 1) calculate the level of one node through level order traversal similarly > > for other > > 2) then find the Least Common Anscestor > > 3) then dist(LCS - node1) + dist(LCS - node2) > > > but i think this was not optimized bcse he was not very much satisfied by > > this > > > So if any of you know some bettr approach then please tell > > > thanks a lot :) > > > -- > > 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] Re:
It's possible you're not getting any clear answers because the question is unclear. Linux does many different kinds of name lookup all over the system. What names are you talking about? On Mar 1, 3:50 pm, aanchal goyal wrote: > anyone knows what hash function is used in the name lookup procedure in > linux? > > Procedure lookup(name) > 1: h := hash(name) > 2: dentryNode := hashtable(h) > 3: while dentryNode != NULL do > 4: if dentryNode- >name != name then > 5: dentryNode := dentryNode- >next > 6: else > 7: return dentryNode > 8: end if > 9: end while > -- > Regards,* > Aanchal Goyal*. -- 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: Regarding Wikipedia Download
This should help http://en.wikipedia.org/wiki/Wikipedia:Database_download On Fri, Mar 2, 2012 at 9:25 PM, shady wrote: > actually i wanted it for research purposes, one that i can download and > then use it > > > On Fri, Mar 2, 2012 at 8:17 PM, Dave wrote: > >> @Shady: This is pretty elementary. wikipedia.org lets you choose your >> language. But even if you didn't know that, you can google "spanish >> wikipedia" etc. >> >> Dave >> >> On Mar 2, 7:02 am, shady wrote: >> > Hi, >> > Is there a place from where i can download Wikipedia for other languages >> > like Spanish, Hindi etc. ? If yes, please help, it is urgent. I googled >> a >> > bit, but couldn't find anything useful. >> > >> > 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 >> 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. > -- Cheers Praveen -- 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: Regarding Wikipedia Download
actually i wanted it for research purposes, one that i can download and then use it On Fri, Mar 2, 2012 at 8:17 PM, Dave wrote: > @Shady: This is pretty elementary. wikipedia.org lets you choose your > language. But even if you didn't know that, you can google "spanish > wikipedia" etc. > > Dave > > On Mar 2, 7:02 am, shady wrote: > > Hi, > > Is there a place from where i can download Wikipedia for other languages > > like Spanish, Hindi etc. ? If yes, please help, it is urgent. I googled a > > bit, but couldn't find anything useful. > > > > 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 > 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] Re: thanx to all
agreed with u~~ On 3月1日, 下午12时06分, atul anand wrote: > didnt get this question :- > > *minimum separation distance between two nodes of tree * > minimum sepration on what basis , is it similar to Dijkstra algo ??? > > On Wed, Feb 29, 2012 at 11:35 PM, Ravi Ranjan wrote: > > > > > > > > > @all > > > 3 round liye > > > 1.5 hours each only data structure n algorithm n 2 qstns from OS but > > ultimately the code for synchronization(a mix situation of linked-list n > > semaphore) > > > they asked linked list tree programs their variations(all to implement in > > C) > > > i stuck at this place when they tell me to write minimum separation > > distance between two nodes of tree > > first i use recursion then > > then they tell to write using one recursion and one loop. :P > > and tell me to explain the stack formation on memory layout along with > > its complexity... > > i got confused whther combining both loops and stack have same as that of > > two loops/ two recursions > > basically they are creating some mental pressure for me by confusing me > > crtisizing me.. i was tired till the last interview > > but finally they hired me. :D:D:D:D > > > the last round was the difficult one here they are focussin on graph... my > > graph is little weak(implementation part) > > > i think most of the qstns were of MS and Amazon(trees n graph optimization) > > and is discussed here.. > > > thanx a lot to you guys... > > > -- > > 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] Re: Regarding Wikipedia Download
@Shady: This is pretty elementary. wikipedia.org lets you choose your language. But even if you didn't know that, you can google "spanish wikipedia" etc. Dave On Mar 2, 7:02 am, shady wrote: > Hi, > Is there a place from where i can download Wikipedia for other languages > like Spanish, Hindi etc. ? If yes, please help, it is urgent. I googled a > bit, but couldn't find anything useful. > > 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] [Offtopic] Regarding Wikipedia Download
Hi, Is there a place from where i can download Wikipedia for other languages like Spanish, Hindi etc. ? If yes, please help, it is urgent. I googled a bit, but couldn't find anything useful. 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks]
"The function hash is the hash function the Linux kernel used in the dentry cache." - quoted from the same paper, *SPEC SFS **is one example of dentry hash function. Might wanna google to learn in detail, it has got of details which i couldn't understand.* On Fri, Mar 2, 2012 at 2:20 AM, aanchal goyal wrote: > anyone knows what hash function is used in the name lookup procedure in > linux? > > Procedure lookup(name) > 1: h := hash(name) > 2: dentryNode := hashtable(h) > 3: while dentryNode != NULL do > 4: if dentryNode- >name != name then > 5: dentryNode := dentryNode- >next > 6: else > 7: return dentryNode > 8: end if > 9: end while > -- > Regards,* > Aanchal Goyal*. > > -- > 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.