Re: [algogeeks] Google Question:Given a BST and a number, Find the closest node to that number in the BST.
what would be the complexity of your solution O(n) or O(log n)..? On Sat, Aug 20, 2011 at 12:19 PM, sukran dhawan wrote: > traverse bst inorder and each time u encounter a node find the difference > between the element and given element in question . if the absolute > difference is minimum after traversing the tree that is the element . u can > getback the element using another element which keeps sign of the element so > that original element can be obtained from diff > > On Sat, Aug 20, 2011 at 12:15 PM, Abhishek Yadav < > algowithabhis...@gmail.com> wrote: > >> Given a BST and a number, Find the closest node to that number in the >> BST. Give an algorithm for that. >> Let there be binary search tree having nodes with values >> 12,34,64,23,64,25,76,6 and the number given is 28, then the answer >> would be 25 as it is the closest node. >> >> -- >> 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. > -- 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] VERY URGENT .. PLZ HELP
Guys suggest me some topics , some sites , some stuffs and watever known to the best of ur knowledge , it will be helpful for me On Sat, Aug 20, 2011 at 11:47 AM, mani walia wrote: > no they are not asking for money , even they are providing gud stipend and > if performance is good , then we can get the PPO. > > please help me regarding that , i dnt want to let that opportunity go.. > please help > > > On Sat, Aug 20, 2011 at 11:43 AM, Rahul wrote: > >> dude ,are they asking for money , if they are then they might not ask >> even questions . >> >> On 8/20/11, mani walia wrote: >> > yeah >> > >> > >> > On Sat, Aug 20, 2011 at 11:33 AM, sukran dhawan >> > wrote: >> > >> >> for training ? >> >> >> >> On Sat, Aug 20, 2011 at 11:32 AM, mani walia >> wrote: >> >> >> >>> ORACLE COMING TO OUR COLLEGE FOR TRAINING... >> >>> >> >>> CAN ANYONE FROM THIS GROUP TELL ME ABOUT HOW TO PREPARE FOR THAT? >> >>> >> >>> I WILL BE REALLY THANKFUL TO THAT PERSON.. >> >>> >> >>> PLEASE HELP ME.. >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> THANKS >> >>> MANI >> >>> >> >>> -- >> >>> 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. >> >> >> > >> > -- >> > 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. >> > >> > >> >> >> -- >> Rahul >> >> -- >> 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] Google Question:Given a BST and a number, Find the closest node to that number in the BST.
traverse bst inorder and each time u encounter a node find the difference between the element and given element in question . if the absolute difference is minimum after traversing the tree that is the element . u can getback the element using another element which keeps sign of the element so that original element can be obtained from diff On Sat, Aug 20, 2011 at 12:15 PM, Abhishek Yadav wrote: > Given a BST and a number, Find the closest node to that number in the > BST. Give an algorithm for that. > Let there be binary search tree having nodes with values > 12,34,64,23,64,25,76,6 and the number given is 28, then the answer > would be 25 as it is the closest node. > > -- > 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] Google Question:Given a BST and a number, Find the closest node to that number in the BST.
Given a BST and a number, Find the closest node to that number in the BST. Give an algorithm for that. Let there be binary search tree having nodes with values 12,34,64,23,64,25,76,6 and the number given is 28, then the answer would be 25 as it is the closest node. -- 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] help
ORACLE COMING TO OUR COLLEGE FOR TRAINING... CAN ANYONE FROM THIS GROUP TELL ME ABOUT HOW TO PREPARE FOR THAT? I WILL BE REALLY THANKFUL TO THAT PERSON.. PLEASE HELP ME.. -- 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] Interview Questions
most of them look for ur communication skills if though they ask technical stuffs .thats the worst part of banking and finance companies On Wed, Aug 17, 2011 at 11:33 AM, SAMMM wrote: > Can anyone tell me wht does banking firm ask in interview other than > Technical stuffs , algo , puzzles?? Any suggestion . > > -- > 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] GK-Q
Yes ans is fff0, my mistake. On Sat, Aug 20, 2011 at 11:56 AM, sukran dhawan wrote: > check o/p once.it shud be fff0 coz rightmost bits are filled with 0s > > > On Sat, Aug 20, 2011 at 11:56 AM, sukran dhawan wrote: > >> i got the answer as fff0 >> >> >> On Sat, Aug 20, 2011 at 11:55 AM, Vijay Khandar >> wrote: >> >>> Thank you very much..now i got it. >>> >>> >>> On Sat, Aug 20, 2011 at 11:51 AM, Ayswarya Srinivasan < >>> krsayswa...@gmail.com> wrote: >>> i guess the output is fff0 -1 = 0001 taking 1's complement 1110 taking 2's complement -1<<4 left shifting 4 bits %x prints in hexa decimal format so o/p- f f f 0 On Sat, Aug 20, 2011 at 11:39 AM, Vijay Khandar < vijaykhand...@gmail.com> wrote: > main() > { > printf("\n %x",-1<<4); > } > > o/p- > > Plz tell me anyone how this program is working? what is the meaning of > -1<<4, 45>>6,-6<<65 etc.. how this statement is executed..? > > Vijay > > -- > 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. > > -- Regards, Ayswarya S -- 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. >>> >> >> > -- > 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] GK-Q
check o/p once.it shud be fff0 coz rightmost bits are filled with 0s On Sat, Aug 20, 2011 at 11:56 AM, sukran dhawan wrote: > i got the answer as fff0 > > > On Sat, Aug 20, 2011 at 11:55 AM, Vijay Khandar > wrote: > >> Thank you very much..now i got it. >> >> >> On Sat, Aug 20, 2011 at 11:51 AM, Ayswarya Srinivasan < >> krsayswa...@gmail.com> wrote: >> >>> i guess the output is fff0 >>> >>> -1 = 0001 >>> taking 1's complement >>> 1110 >>> taking 2's complement >>> >>> -1<<4 >>> left shifting 4 bits >>> >>> >>> %x prints in hexa decimal format >>> so o/p- f f f 0 >>> >>> >>> On Sat, Aug 20, 2011 at 11:39 AM, Vijay Khandar >> > wrote: >>> main() { printf("\n %x",-1<<4); } o/p- Plz tell me anyone how this program is working? what is the meaning of -1<<4, 45>>6,-6<<65 etc.. how this statement is executed..? Vijay -- 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. >>> >>> >>> -- >>> Regards, >>> Ayswarya S >>> >>> -- >>> 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. >> > > -- 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] GK-Q
i got the answer as fff0 On Sat, Aug 20, 2011 at 11:55 AM, Vijay Khandar wrote: > Thank you very much..now i got it. > > > On Sat, Aug 20, 2011 at 11:51 AM, Ayswarya Srinivasan < > krsayswa...@gmail.com> wrote: > >> i guess the output is fff0 >> >> -1 = 0001 >> taking 1's complement >> 1110 >> taking 2's complement >> >> -1<<4 >> left shifting 4 bits >> >> >> %x prints in hexa decimal format >> so o/p- f f f 0 >> >> >> On Sat, Aug 20, 2011 at 11:39 AM, Vijay Khandar >> wrote: >> >>> main() >>> { >>> printf("\n %x",-1<<4); >>> } >>> >>> o/p- >>> >>> Plz tell me anyone how this program is working? what is the meaning of >>> -1<<4, 45>>6,-6<<65 etc.. how this statement is executed..? >>> >>> Vijay >>> >>> -- >>> 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. >>> >>> >> >> >> -- >> Regards, >> Ayswarya S >> >> -- >> 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. > -- 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] GK-Q
Thank you very much..now i got it. On Sat, Aug 20, 2011 at 11:51 AM, Ayswarya Srinivasan wrote: > i guess the output is fff0 > > -1 = 0001 > taking 1's complement > 1110 > taking 2's complement > > -1<<4 > left shifting 4 bits > > > %x prints in hexa decimal format > so o/p- f f f 0 > > > On Sat, Aug 20, 2011 at 11:39 AM, Vijay Khandar > wrote: > >> main() >> { >> printf("\n %x",-1<<4); >> } >> >> o/p- >> >> Plz tell me anyone how this program is working? what is the meaning of >> -1<<4, 45>>6,-6<<65 etc.. how this statement is executed..? >> >> Vijay >> >> -- >> 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. >> >> > > > -- > Regards, > Ayswarya S > > -- > 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] query.. amazon question
@ gopi: I think you are referring to the even number of elements in the list. Anyhow, here is the solution to the odd number of elements. http://ideone.com/5nmzL Now is the problem solved? On 20 August 2011 10:47, *$* wrote: > Hi, > But as per the given problem , that constraint is not specified.. > > thx, > --Gopi > > > On Sat, Aug 20, 2011 at 9:25 AM, Dipankar Patro wrote: > >> Fixed the problem. There was a problem with the first element positioning. >> >> Here is the final solution: >> http://ideone.com/XwymV >> >> ^^ Time complexity - O(2n) >> Space complexity O(1) >> >> :) >> On 20 August 2011 08:14, Dipankar Patro wrote: >> >>> http://ideone.com/ucO4d >>> >>> Total no. of elements should be even (I assume) and it is also failing >>> for some test cases. Working on to zero down to the error in algo. >>> >>> On 20 August 2011 02:11, JAIDEV YADAV wrote: >>> this was earlier in this group... Please see this paper: http://j.mp/rtNp4W On Fri, Aug 19, 2011 at 2:40 PM, Abhishek Yadav < abhishek30.nit...@gmail.com> wrote: > Its the same as we do merge sort where we merge the two sorted array > into one which will require an extra array.. > Is there any algorithm for inplace mergesort...? > > On Fri, Aug 19, 2011 at 2:09 PM, sagar pareek > wrote: > >> Can be done in O(n) time but it will need O(n) space too >> >> take another array of same length >> >> then its code will be >> >> for( i=0,j=0,k=n/2+1 ;i<=n/2&&k> { >> if(arr[i]>arr[k]) >> new[j++]=arr[k++]; >> else >> new[j++]=arr[i++]; >> } >> >> if(k> { >>while(i<=n/2) >>new[j++]=arr[i++] >> } >> else >> { >> while(j>new[j++]=arr[k++] >> >> } >> >> On Fri, Aug 19, 2011 at 12:40 AM, *$* wrote: >> >>> Sort an array of n positive integers containing n/2 sorted integers >>> in first and second-half? >>> in O(n) time complexity .. >>> and space complexity should be constant >>> >>> >>> -- >>> 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. >>> >> >> >> >> -- >> **Regards >> SAGAR PAREEK >> COMPUTER SCIENCE AND ENGINEERING >> NIT ALLAHABAD >> >> -- >> 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. >> > > > > -- > Abhishek Yadav > Comp Engg. > NIT Kurukshetra > > -- > 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. > -- JaiDev Yadav (National Yoga Champion) Computer Engg. Dept. National Institute of Technology Kurukshetra,Haryana -- 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. >>> >>> >>> >>> -- >>> >>> ___ >>> >>> Please do not print this e-mail until urgent requirement. Go Green!! >>> Save Papers <=> Save Trees >>> >> >> >> >> -- >> >> ___ >> >> Please do not print this e-mail until urgent requirement. Go Green!! >> Save Papers <=> Save Trees >> >> -- >> 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. >> > > > > -- > Thx, > --Gopi > > > -- > You received this message be
Re: [algogeeks] GK-Q
i guess the output is fff0 -1 = 0001 taking 1's complement 1110 taking 2's complement -1<<4 left shifting 4 bits %x prints in hexa decimal format so o/p- f f f 0 On Sat, Aug 20, 2011 at 11:39 AM, Vijay Khandar wrote: > main() > { > printf("\n %x",-1<<4); > } > > o/p- > > Plz tell me anyone how this program is working? what is the meaning of > -1<<4, 45>>6,-6<<65 etc.. how this statement is executed..? > > Vijay > > -- > 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. > > -- Regards, Ayswarya S -- 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] VERY URGENT .. PLZ HELP
no they are not asking for money , even they are providing gud stipend and if performance is good , then we can get the PPO. please help me regarding that , i dnt want to let that opportunity go.. please help On Sat, Aug 20, 2011 at 11:43 AM, Rahul wrote: > dude ,are they asking for money , if they are then they might not ask > even questions . > > On 8/20/11, mani walia wrote: > > yeah > > > > > > On Sat, Aug 20, 2011 at 11:33 AM, sukran dhawan > > wrote: > > > >> for training ? > >> > >> On Sat, Aug 20, 2011 at 11:32 AM, mani walia > wrote: > >> > >>> ORACLE COMING TO OUR COLLEGE FOR TRAINING... > >>> > >>> CAN ANYONE FROM THIS GROUP TELL ME ABOUT HOW TO PREPARE FOR THAT? > >>> > >>> I WILL BE REALLY THANKFUL TO THAT PERSON.. > >>> > >>> PLEASE HELP ME.. > >>> > >>> > >>> > >>> > >>> > >>> THANKS > >>> MANI > >>> > >>> -- > >>> 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. > >> > > > > -- > > 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. > > > > > > > -- > Rahul > > -- > 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] thanx...
Congrates On Sat, Aug 20, 2011 at 10:20 AM, Ankur pratik wrote: > samsung engineering labs > > > On Sat, Aug 20, 2011 at 10:18 AM, sukran dhawan wrote: > >> where ? >> >> On Sat, Aug 20, 2011 at 10:16 AM, ankur pratik wrote: >> >>> thanx to all members of algo geeks... i got a job... this goup is >>> awesome for any discussion >>> >>> -- >>> 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. >> > > > > -- > Warm Regards-- > > Ankur Pratik > Computer Science & Engg Dept > Undergraduate Student > National Institute of Technology > Durgapur > India > > -- > 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] VERY URGENT .. PLZ HELP
dude ,are they asking for money , if they are then they might not ask even questions . On 8/20/11, mani walia wrote: > yeah > > > On Sat, Aug 20, 2011 at 11:33 AM, sukran dhawan > wrote: > >> for training ? >> >> On Sat, Aug 20, 2011 at 11:32 AM, mani walia wrote: >> >>> ORACLE COMING TO OUR COLLEGE FOR TRAINING... >>> >>> CAN ANYONE FROM THIS GROUP TELL ME ABOUT HOW TO PREPARE FOR THAT? >>> >>> I WILL BE REALLY THANKFUL TO THAT PERSON.. >>> >>> PLEASE HELP ME.. >>> >>> >>> >>> >>> >>> THANKS >>> MANI >>> >>> -- >>> 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. >> > > -- > 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. > > -- Rahul -- 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] GK-Q
main() { printf("\n %x",-1<<4); } o/p- Plz tell me anyone how this program is working? what is the meaning of -1<<4, 45>>6,-6<<65 etc.. how this statement is executed..? Vijay -- 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] VERY URGENT .. PLZ HELP
yeah On Sat, Aug 20, 2011 at 11:33 AM, sukran dhawan wrote: > for training ? > > On Sat, Aug 20, 2011 at 11:32 AM, mani walia wrote: > >> ORACLE COMING TO OUR COLLEGE FOR TRAINING... >> >> CAN ANYONE FROM THIS GROUP TELL ME ABOUT HOW TO PREPARE FOR THAT? >> >> I WILL BE REALLY THANKFUL TO THAT PERSON.. >> >> PLEASE HELP ME.. >> >> >> >> >> >> THANKS >> MANI >> >> -- >> 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. > -- 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] VERY URGENT .. PLZ HELP
for training ? On Sat, Aug 20, 2011 at 11:32 AM, mani walia wrote: > ORACLE COMING TO OUR COLLEGE FOR TRAINING... > > CAN ANYONE FROM THIS GROUP TELL ME ABOUT HOW TO PREPARE FOR THAT? > > I WILL BE REALLY THANKFUL TO THAT PERSON.. > > PLEASE HELP ME.. > > > > > > THANKS > MANI > > -- > 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] VERY URGENT .. PLZ HELP
ORACLE COMING TO OUR COLLEGE FOR TRAINING... CAN ANYONE FROM THIS GROUP TELL ME ABOUT HOW TO PREPARE FOR THAT? I WILL BE REALLY THANKFUL TO THAT PERSON.. PLEASE HELP ME.. THANKS MANI -- 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] C-Question
If the binary equivalent of 5.375 in normalised form is - 0100 1010 1100 what is the o/p of following code- main() { float a=5.375; char *p; int i; p=(char *)&a; for(i=0;i<=3;i++) printf("%02X",(unsigned char)p[i]); } O/P= 00 00 AC 40 Plz, Plz anyone explain me in detail, how this o/p is coming? Vijay.. -- 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] Syllogism
yes On Sat, Aug 20, 2011 at 10:26 AM, geek_one wrote: > Statement: Some girls are beautiful. > Conclusion: Some girls are not beautiful. > > is the conclusion is true on the basis of Statement? > > -- > 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/-/SGSGlmwYFBAJ. > 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] query.. amazon question
Hi, But as per the given problem , that constraint is not specified.. thx, --Gopi On Sat, Aug 20, 2011 at 9:25 AM, Dipankar Patro wrote: > Fixed the problem. There was a problem with the first element positioning. > > Here is the final solution: > http://ideone.com/XwymV > > ^^ Time complexity - O(2n) > Space complexity O(1) > > :) > On 20 August 2011 08:14, Dipankar Patro wrote: > >> http://ideone.com/ucO4d >> >> Total no. of elements should be even (I assume) and it is also failing for >> some test cases. Working on to zero down to the error in algo. >> >> On 20 August 2011 02:11, JAIDEV YADAV wrote: >> >>> this was earlier in this group... >>> Please see this paper: http://j.mp/rtNp4W >>> >>> >>> On Fri, Aug 19, 2011 at 2:40 PM, Abhishek Yadav < >>> abhishek30.nit...@gmail.com> wrote: >>> Its the same as we do merge sort where we merge the two sorted array into one which will require an extra array.. Is there any algorithm for inplace mergesort...? On Fri, Aug 19, 2011 at 2:09 PM, sagar pareek wrote: > Can be done in O(n) time but it will need O(n) space too > > take another array of same length > > then its code will be > > for( i=0,j=0,k=n/2+1 ;i<=n/2&&k { > if(arr[i]>arr[k]) > new[j++]=arr[k++]; > else > new[j++]=arr[i++]; > } > > if(k { >while(i<=n/2) >new[j++]=arr[i++] > } > else > { > while(jnew[j++]=arr[k++] > > } > > On Fri, Aug 19, 2011 at 12:40 AM, *$* wrote: > >> Sort an array of n positive integers containing n/2 sorted integers in >> first and second-half? >> in O(n) time complexity .. >> and space complexity should be constant >> >> >> -- >> 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. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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. > -- Abhishek Yadav Comp Engg. NIT Kurukshetra -- 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. >>> >>> >>> >>> -- >>> JaiDev Yadav >>> (National Yoga Champion) >>> Computer Engg. Dept. >>> National Institute of Technology >>> Kurukshetra,Haryana >>> >>> -- >>> 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. >>> >> >> >> >> -- >> >> ___ >> >> Please do not print this e-mail until urgent requirement. Go Green!! >> Save Papers <=> Save Trees >> > > > > -- > > ___ > > Please do not print this e-mail until urgent requirement. Go Green!! > Save Papers <=> Save Trees > > -- > 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. > -- Thx, --Gopi -- 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] thanx...
Share ur Experience here. By this u can Help also.. On Fri, Aug 19, 2011 at 11:53 PM, Anushruti Gupta < anushrutithegr...@gmail.com> wrote: > > Congratulations:) > > On Sat, Aug 20, 2011 at 10:20 AM, Ankur pratik wrote: > >> samsung engineering labs >> >> >> On Sat, Aug 20, 2011 at 10:18 AM, sukran dhawan >> wrote: >> >>> where ? >>> >>> On Sat, Aug 20, 2011 at 10:16 AM, ankur pratik >>> wrote: >>> thanx to all members of algo geeks... i got a job... this goup is awesome for any discussion -- 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. >>> >> >> >> >> -- >> Warm Regards-- >> >> Ankur Pratik >> Computer Science & Engg Dept >> Undergraduate Student >> National Institute of Technology >> Durgapur >> India >> >> -- >> 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. > -- Tasvinder Singh B.Tech Final Year, Department of Computer Engineering, Malaviya National Institute Of Technology, Jaipur. Contact: +91-9460627331 -- 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] query.. amazon question
Hello all I have just joined the group and I am happy that I took this decision..:) However I want to direct all the mails from the group to another id that I made specifically for this group..but it is not showing the email id in the drop down box in the setting ...Please help Cosmexia On Sat, Aug 20, 2011 at 9:25 AM, Dipankar Patro wrote: > Fixed the problem. There was a problem with the first element positioning. > > Here is the final solution: > http://ideone.com/XwymV > > ^^ Time complexity - O(2n) > Space complexity O(1) > > :) > On 20 August 2011 08:14, Dipankar Patro wrote: > >> http://ideone.com/ucO4d >> >> Total no. of elements should be even (I assume) and it is also failing for >> some test cases. Working on to zero down to the error in algo. >> >> On 20 August 2011 02:11, JAIDEV YADAV wrote: >> >>> this was earlier in this group... >>> Please see this paper: http://j.mp/rtNp4W >>> >>> >>> On Fri, Aug 19, 2011 at 2:40 PM, Abhishek Yadav < >>> abhishek30.nit...@gmail.com> wrote: >>> Its the same as we do merge sort where we merge the two sorted array into one which will require an extra array.. Is there any algorithm for inplace mergesort...? On Fri, Aug 19, 2011 at 2:09 PM, sagar pareek wrote: > Can be done in O(n) time but it will need O(n) space too > > take another array of same length > > then its code will be > > for( i=0,j=0,k=n/2+1 ;i<=n/2&&k { > if(arr[i]>arr[k]) > new[j++]=arr[k++]; > else > new[j++]=arr[i++]; > } > > if(k { >while(i<=n/2) >new[j++]=arr[i++] > } > else > { > while(jnew[j++]=arr[k++] > > } > > On Fri, Aug 19, 2011 at 12:40 AM, *$* wrote: > >> Sort an array of n positive integers containing n/2 sorted integers in >> first and second-half? >> in O(n) time complexity .. >> and space complexity should be constant >> >> >> -- >> 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. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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. > -- Abhishek Yadav Comp Engg. NIT Kurukshetra -- 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. >>> >>> >>> >>> -- >>> JaiDev Yadav >>> (National Yoga Champion) >>> Computer Engg. Dept. >>> National Institute of Technology >>> Kurukshetra,Haryana >>> >>> -- >>> 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. >>> >> >> >> >> -- >> >> ___ >> >> Please do not print this e-mail until urgent requirement. Go Green!! >> Save Papers <=> Save Trees >> > > > > -- > > ___ > > Please do not print this e-mail until urgent requirement. Go Green!! > Save Papers <=> Save Trees > > -- > 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 mo
[algogeeks] Syllogism
Statement: Some girls are beautiful. Conclusion: Some girls are not beautiful. is the conclusion is true on the basis of Statement? -- 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/-/SGSGlmwYFBAJ. 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] thanx...
Congratulations:) On Sat, Aug 20, 2011 at 10:20 AM, Ankur pratik wrote: > samsung engineering labs > > > On Sat, Aug 20, 2011 at 10:18 AM, sukran dhawan wrote: > >> where ? >> >> On Sat, Aug 20, 2011 at 10:16 AM, ankur pratik wrote: >> >>> thanx to all members of algo geeks... i got a job... this goup is >>> awesome for any discussion >>> >>> -- >>> 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. >> > > > > -- > Warm Regards-- > > Ankur Pratik > Computer Science & Engg Dept > Undergraduate Student > National Institute of Technology > Durgapur > India > > -- > 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] thanx...
samsung engineering labs On Sat, Aug 20, 2011 at 10:18 AM, sukran dhawan wrote: > where ? > > On Sat, Aug 20, 2011 at 10:16 AM, ankur pratik wrote: > >> thanx to all members of algo geeks... i got a job... this goup is >> awesome for any discussion >> >> -- >> 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. > -- Warm Regards-- Ankur Pratik Computer Science & Engg Dept Undergraduate Student National Institute of Technology Durgapur India -- 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] thanx...
where ? On Sat, Aug 20, 2011 at 10:16 AM, ankur pratik wrote: > thanx to all members of algo geeks... i got a job... this goup is > awesome for any discussion > > -- > 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] thanx...
thanx to all members of algo geeks... i got a job... this goup is awesome for any discussion -- 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] c++ q
if the sie is 0 then objects cannot ve unique addresses. atleast one byte is required to hold a unique address On Fri, Aug 19, 2011 at 5:46 PM, priya ramesh < love.for.programm...@gmail.com> wrote: > why will the objects have same addresses if the size is 0?? > > -- > 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] c
may be it places the variable in read only memory On Thu, Aug 18, 2011 at 2:38 AM, bihari wrote: > How to prevent the compiler to alter the value of i in statement: > const int i=2; > Just give the idea about the implementation of const int i=somevalue; > > -- > 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: netapp!
NetApp Pattern at MNIT Jaipur : 1. Written Apti-10 C and C++-15 Data Structure- 15 OS and Networking(they called this section System)- 10 2. Coding Test 4 Problem Simple like 1. how to find nth element from last in linklist 2. how to find path b/w two nodes in a tree 3. how to find rotation (ABCD and CDAB){MS ques.} 4. how to rotate clockwise (1 2 3 4 5 6 7 8 ---> 6 7 8 1 2 3 4 5) 3. There can be 2 to 3 tech interview depending on you tech 1 and tech2:: they ask complete OS (Boot Process to interrupt.. all and some tricky C question (big endien, little endien, printf behaviours, dictionary implementation) tech 3:: they give some problem to solve like lift problem how you will schedule and all. HR :: Simple HR questions Note:: They can ask HR question in between tech rounds also. On Fri, Aug 19, 2011 at 10:58 PM, saurabh wrote: > they didn't asked a single question neither in written nor in > interviews... > > On Aug 19, 9:57 am, priya ramesh > wrote: > > @saurabh: thanks a lot! isn't DBMS important?? > > -- > 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. > > -- Tasvinder Singh B.Tech Final Year, Department of Computer Engineering, Malaviya National Institute Of Technology, Jaipur. Contact: +91-9460627331 -- 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: Directi
some more questions apart from them 1. area of the largest square such that it lies only on the black square of chess such that the side of the chess square is 2 cm. 2. there is a rectangle area such that in it m number of roads are moving from east to west and n number of roads are moving from north to south how many number of men are needed to be placed at the intersection to roads so that all the roads are monitored ans : max(m,n) 3. one question on the cron job command in which given the sequence we have to tell the meaning what will it do sequence is 15 * * * 2,3,4 comand like that not exactly 4. one question is on the threads that is what threads don't share in the processes 5. one question is on the fork() function 6. on equestion is on the recursive and non recursive dns method to resolve the hostname to ip -- 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: netapp!
they didn't asked a single question neither in written nor in interviews... On Aug 19, 9:57 am, priya ramesh wrote: > @saurabh: thanks a lot! isn't DBMS important?? -- 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] query.. amazon question
Fixed the problem. There was a problem with the first element positioning. Here is the final solution: http://ideone.com/XwymV ^^ Time complexity - O(2n) Space complexity O(1) :) On 20 August 2011 08:14, Dipankar Patro wrote: > http://ideone.com/ucO4d > > Total no. of elements should be even (I assume) and it is also failing for > some test cases. Working on to zero down to the error in algo. > > On 20 August 2011 02:11, JAIDEV YADAV wrote: > >> this was earlier in this group... >> Please see this paper: http://j.mp/rtNp4W >> >> >> On Fri, Aug 19, 2011 at 2:40 PM, Abhishek Yadav < >> abhishek30.nit...@gmail.com> wrote: >> >>> Its the same as we do merge sort where we merge the two sorted array into >>> one which will require an extra array.. >>> Is there any algorithm for inplace mergesort...? >>> >>> On Fri, Aug 19, 2011 at 2:09 PM, sagar pareek wrote: >>> Can be done in O(n) time but it will need O(n) space too take another array of same length then its code will be for( i=0,j=0,k=n/2+1 ;i<=n/2&&k>>> { if(arr[i]>arr[k]) new[j++]=arr[k++]; else new[j++]=arr[i++]; } if(k>>> { while(i<=n/2) new[j++]=arr[i++] } else { while(j>>>new[j++]=arr[k++] } On Fri, Aug 19, 2011 at 12:40 AM, *$* wrote: > Sort an array of n positive integers containing n/2 sorted integers in > first and second-half? > in O(n) time complexity .. > and space complexity should be constant > > > -- > 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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. >>> >>> >>> >>> -- >>> Abhishek Yadav >>> Comp Engg. >>> NIT Kurukshetra >>> >>> -- >>> 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. >>> >> >> >> >> -- >> JaiDev Yadav >> (National Yoga Champion) >> Computer Engg. Dept. >> National Institute of Technology >> Kurukshetra,Haryana >> >> -- >> 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. >> > > > > -- > > ___ > > Please do not print this e-mail until urgent requirement. Go Green!! > Save Papers <=> Save Trees > -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers <=> Save Trees -- 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] query.. amazon question
http://ideone.com/ucO4d Total no. of elements should be even (I assume) and it is also failing for some test cases. Working on to zero down to the error in algo. On 20 August 2011 02:11, JAIDEV YADAV wrote: > this was earlier in this group... > Please see this paper: http://j.mp/rtNp4W > > > On Fri, Aug 19, 2011 at 2:40 PM, Abhishek Yadav < > abhishek30.nit...@gmail.com> wrote: > >> Its the same as we do merge sort where we merge the two sorted array into >> one which will require an extra array.. >> Is there any algorithm for inplace mergesort...? >> >> On Fri, Aug 19, 2011 at 2:09 PM, sagar pareek wrote: >> >>> Can be done in O(n) time but it will need O(n) space too >>> >>> take another array of same length >>> >>> then its code will be >>> >>> for( i=0,j=0,k=n/2+1 ;i<=n/2&&k>> { >>> if(arr[i]>arr[k]) >>> new[j++]=arr[k++]; >>> else >>> new[j++]=arr[i++]; >>> } >>> >>> if(k>> { >>>while(i<=n/2) >>>new[j++]=arr[i++] >>> } >>> else >>> { >>> while(j>>new[j++]=arr[k++] >>> >>> } >>> >>> On Fri, Aug 19, 2011 at 12:40 AM, *$* wrote: >>> Sort an array of n positive integers containing n/2 sorted integers in first and second-half? in O(n) time complexity .. and space complexity should be constant -- 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. >>> >>> >>> >>> -- >>> **Regards >>> SAGAR PAREEK >>> COMPUTER SCIENCE AND ENGINEERING >>> NIT ALLAHABAD >>> >>> -- >>> 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. >>> >> >> >> >> -- >> Abhishek Yadav >> Comp Engg. >> NIT Kurukshetra >> >> -- >> 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. >> > > > > -- > JaiDev Yadav > (National Yoga Champion) > Computer Engg. Dept. > National Institute of Technology > Kurukshetra,Haryana > > -- > 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. > -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers <=> Save Trees -- 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: Directi
k thanxgot it On Aug 19, 9:07 pm, sagar pareek wrote: > search the archives ... > direct i's questions already discussed many times > > > > On Fri, Aug 19, 2011 at 9:33 PM, Agyat wrote: > > Hi, friends > > tom i m having directi written test followed by coding(ol) and written > > test is eliminative and i need ur help.What does directi ask in > > written and what type ques from which subject and what level of quest > > both in written and ol coding round > > > -- > > 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. > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD -- 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: Adobe Interview Puzzles Urgent !!
I could not visualize the situation, could please elaborate on the positioning of the axis and the spheres? You haven't told whether they are touching each other or not ? -- 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/-/hC_-59e9SmsJ. 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] query.. amazon question
this was earlier in this group... Please see this paper: http://j.mp/rtNp4W On Fri, Aug 19, 2011 at 2:40 PM, Abhishek Yadav wrote: > Its the same as we do merge sort where we merge the two sorted array into > one which will require an extra array.. > Is there any algorithm for inplace mergesort...? > > On Fri, Aug 19, 2011 at 2:09 PM, sagar pareek wrote: > >> Can be done in O(n) time but it will need O(n) space too >> >> take another array of same length >> >> then its code will be >> >> for( i=0,j=0,k=n/2+1 ;i<=n/2&&k> { >> if(arr[i]>arr[k]) >> new[j++]=arr[k++]; >> else >> new[j++]=arr[i++]; >> } >> >> if(k> { >>while(i<=n/2) >>new[j++]=arr[i++] >> } >> else >> { >> while(j>new[j++]=arr[k++] >> >> } >> >> On Fri, Aug 19, 2011 at 12:40 AM, *$* wrote: >> >>> Sort an array of n positive integers containing n/2 sorted integers in >>> first and second-half? >>> in O(n) time complexity .. >>> and space complexity should be constant >>> >>> >>> -- >>> 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. >>> >> >> >> >> -- >> **Regards >> SAGAR PAREEK >> COMPUTER SCIENCE AND ENGINEERING >> NIT ALLAHABAD >> >> -- >> 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. >> > > > > -- > Abhishek Yadav > Comp Engg. > NIT Kurukshetra > > -- > 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. > -- JaiDev Yadav (National Yoga Champion) Computer Engg. Dept. National Institute of Technology Kurukshetra,Haryana -- 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: crossing a bridge; running away from zombies (logic puzzle)
@Icy: A few years ago this was reported to be a Microsoft interview question. It is so well publicized now that most people here have probably seen it. 1 and 2 cross. 1 returns. (alternatively, 2 returns) 5 and 10 cross. 2 returns. (alternatively, 1 returns) 1 and 2 cross. 17 minutes. Dave On Aug 19, 3:25 pm, "icy`" wrote: > Hey everyone, > I recently joined this group, so I thought I'd add a short interview/ > logic puzzle that I remember hearing. Hopefully it wasnt already > said. Part of the fun is the story, so here it goes... > > Four people have been running away from a pack of zombies, and are now > injured in varying degrees. It is already nighttime, and they have > come upon a bridge. They must cross the bridge as fast as possible > before the pack of zombies comes upon them, but the bridge is very > dark, slippery, and cannot support much weight. There is one > flashlight. Rules: > > * the bridge must be crossed with the flashlight, only two people at > most. A return trip must be made (the flashlight cannot be thrown > back, etc) > * the four people cross the bridge at different speeds: 1minute, 2 > minutes, 5 min, and 10min. A trip time is determined by the slowest > person. So if the 1min crosses together with the 5min, the trip time > is 5min. > *if a person falls off the bridge, he/she goes to /dev/null ;P > > So what is the fastest way for everyone to cross the bridge, and how > long does that take? > > ~icy -- 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: Puzzle
@DK: What in the statement of the problem led you to believe that these were if-then statements? Dave On Aug 19, 3:15 pm, DK wrote: > Note that in the answer above, the table given is of the form: > > If condition is true then what predicate is true > -- --- > M - married N - not married > N - married L - not married > L - not married M - married > > -- > DK > > http://gplus.to/divyekapoorhttp://twitter.com/divyekapoorhttp://www.divye.in -- 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] crossing a bridge; running away from zombies (logic puzzle)
Hey everyone, I recently joined this group, so I thought I'd add a short interview/ logic puzzle that I remember hearing. Hopefully it wasnt already said. Part of the fun is the story, so here it goes... Four people have been running away from a pack of zombies, and are now injured in varying degrees. It is already nighttime, and they have come upon a bridge. They must cross the bridge as fast as possible before the pack of zombies comes upon them, but the bridge is very dark, slippery, and cannot support much weight. There is one flashlight. Rules: * the bridge must be crossed with the flashlight, only two people at most. A return trip must be made (the flashlight cannot be thrown back, etc) * the four people cross the bridge at different speeds: 1minute, 2 minutes, 5 min, and 10min. A trip time is determined by the slowest person. So if the 1min crosses together with the 5min, the trip time is 5min. *if a person falls off the bridge, he/she goes to /dev/null;P So what is the fastest way for everyone to cross the bridge, and how long does that take? ~icy -- 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] Puzzle
Note that in the answer above, the table given is of the form: If condition is truethen what predicate is true ----- M - married N - not married N - married L - not married L - not married M - married -- DK http://gplus.to/divyekapoor http://twitter.com/divyekapoor http://www.divye.in -- 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/-/uU2w5IqKkJ0J. 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] Puzzle
M - married N - not married N - married L - not married L - not married - M - married When M is married and L and N are not married. This does not violate any condition but you have only 1 of the 3 people married. When N is married, by condition (2) L is not married which implies M is married (by 3) and this implies N is not married by (1). A contradiction. When L is married, implies, N cannot be married (otherwise by (2) L has to be unmarried). This poses no difficulty to M being married. Therefore, L is married to M. -- DK http://twitter.com/divyekapoor http://gplus.to/divyekapoor http://www.divye.in -- 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/-/zULuKD33OmQJ. 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: C dot
they ask very easy questions in interviews. i had faced their interview. first of all they asked me if i had done any project work. then they asked about the platform used and why i had chosen it. then few easy questions about algo of the project. they questioned me on bubble sort. then i was asked to write a program to reverse the words of a string. for example "hi how r u" reversed-> "u r how hi" some other questions they asked some of my friends were ->how to declare an integer pointer. ->what is .net. ->what are features of opp(object oriented prog). On Aug 19, 6:56 pm, aditi garg wrote: > Do u knw wat type of ques asked in interviews? > Plz post a few as example if u knw...please... > On Fri, Aug 19, 2011 at 7:25 PM, aditi garg wrote: > > > > > > > > > > > k thanx :) > > > On Fri, Aug 19, 2011 at 7:19 PM, Sanjay Rajpal > > wrote: > > >> In our college, students were shortlisted on the basis of GPA.Then Direct > >> interview was conducted. > > >> *Regards > > >> Sanju > > >> Happy to Help :)* > > >> On Fri, Aug 19, 2011 at 6:44 AM, aditi garg > >> wrote: > > >>> Does anyone know the placement procedure of C Dot? > > >>> -- > >>> 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. > > > -- > > Aditi Garg > > Undergraduate Student > > Electronics & Communication Divison > > NETAJI SUBHAS INSTITUTE OF TECHNOLOGY > > Sector 3, Dwarka > > New Delhi > > -- > Aditi Garg > Undergraduate Student > Electronics & Communication Divison > NETAJI SUBHAS INSTITUTE OF TECHNOLOGY > Sector 3, Dwarka > New Delhi -- 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: Search an array of unknown length
thanks for pointing it out On Sat, Aug 20, 2011 at 12:16 AM, Dave wrote: > @Sagar: So far so good, but you are not guaranteed to get an > exception. Example, int a[987] is followed in memory by char > b[1000], which is a dictionary. You won't detect an exception > until you get to at least a[262144] (2 to the 18th). But you will pick > up plenty of garbage which may throw off your binary search. > > Dave > > On Aug 19, 1:26 pm, sagar pareek wrote: > > Well > > sorry but i forget to mention exceptions in the solution. > > Here is the complete solution :- > > > > The key idea here is to simultaneously do a binary search > > for the end of the array as well as the key. We try to look for A[2k ] in > > the > > k-th step and catch exceptions for successive values of k till either we > hit > > an exception or we hit a number greater than or equal to b. Then we do > > a binary search for b between indices 2k - 1 and 2k . The runtime of the > > search algorithm is 0 (l og 叫. > > > > > > > > > > > > On Fri, Aug 19, 2011 at 11:53 PM, Dave wrote: > > > @Everyone: The problem says that the array is of UNKNOWN length, but > > > all of the solutions presented assume that the array is of INFINITE > > > length. Suppose, e.g., that the length is 987, but you don't know > > > that. Then it will be meaningless to probe at 1, 10, 100, 1000, etc, > > > or 1, 2, 4, ..., 512, 1024 because any probe beyond 987 is outside the > > > array. An address violation may occur, or arbitrary data, unrelated to > > > the data in the array may be used. I think the problem as stated is > > > unsolvable. > > > > > Dave > > > > > On Aug 19, 12:48 pm, sagar pareek wrote: > > > > HI, > > > > > > I have encountered a problem :- > > > > > > You have an array of *UNKNOWN *length . And you have to find an > element > > > > in O(log(n)) time without using any extra space. > > > > > > -- > > > > **Regards > > > > SAGAR PAREEK > > > > COMPUTER SCIENCE AND ENGINEERING > > > > NIT ALLAHABAD > > > > > -- > > > 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. > > > > -- > > **Regards > > SAGAR PAREEK > > COMPUTER SCIENCE AND ENGINEERING > > NIT ALLAHABAD > > -- > 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. > > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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: Search an array of unknown length
@Sagar: So far so good, but you are not guaranteed to get an exception. Example, int a[987] is followed in memory by char b[1000], which is a dictionary. You won't detect an exception until you get to at least a[262144] (2 to the 18th). But you will pick up plenty of garbage which may throw off your binary search. Dave On Aug 19, 1:26 pm, sagar pareek wrote: > Well > sorry but i forget to mention exceptions in the solution. > Here is the complete solution :- > > The key idea here is to simultaneously do a binary search > for the end of the array as well as the key. We try to look for A[2k ] in > the > k-th step and catch exceptions for successive values of k till either we hit > an exception or we hit a number greater than or equal to b. Then we do > a binary search for b between indices 2k - 1 and 2k . The runtime of the > search algorithm is 0 (l og 叫. > > > > > > On Fri, Aug 19, 2011 at 11:53 PM, Dave wrote: > > @Everyone: The problem says that the array is of UNKNOWN length, but > > all of the solutions presented assume that the array is of INFINITE > > length. Suppose, e.g., that the length is 987, but you don't know > > that. Then it will be meaningless to probe at 1, 10, 100, 1000, etc, > > or 1, 2, 4, ..., 512, 1024 because any probe beyond 987 is outside the > > array. An address violation may occur, or arbitrary data, unrelated to > > the data in the array may be used. I think the problem as stated is > > unsolvable. > > > Dave > > > On Aug 19, 12:48 pm, sagar pareek wrote: > > > HI, > > > > I have encountered a problem :- > > > > You have an array of *UNKNOWN *length . And you have to find an element > > > in O(log(n)) time without using any extra space. > > > > -- > > > **Regards > > > SAGAR PAREEK > > > COMPUTER SCIENCE AND ENGINEERING > > > NIT ALLAHABAD > > > -- > > 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. > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD -- 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: netapp!
kon app? On 19 August 2011 22:27, priya ramesh wrote: > @saurabh: thanks a lot! isn't DBMS important?? > > -- > 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: Search an array of unknown length
Well in that case additive approach will work. Sanju :) -- 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: Search an array of unknown length
Well sorry but i forget to mention exceptions in the solution. Here is the complete solution :- The key idea here is to simultaneously do a binary search for the end of the array as well as the key. We try to look for A[2k ] in the k-th step and catch exceptions for successive values of k till either we hit an exception or we hit a number greater than or equal to b. Then we do a binary search for b between indices 2k - 1 and 2k . The runtime of the search algorithm is 0 (l og 叫. On Fri, Aug 19, 2011 at 11:53 PM, Dave wrote: > @Everyone: The problem says that the array is of UNKNOWN length, but > all of the solutions presented assume that the array is of INFINITE > length. Suppose, e.g., that the length is 987, but you don't know > that. Then it will be meaningless to probe at 1, 10, 100, 1000, etc, > or 1, 2, 4, ..., 512, 1024 because any probe beyond 987 is outside the > array. An address violation may occur, or arbitrary data, unrelated to > the data in the array may be used. I think the problem as stated is > unsolvable. > > Dave > > On Aug 19, 12:48 pm, sagar pareek wrote: > > HI, > > > > I have encountered a problem :- > > > > You have an array of *UNKNOWN *length . And you have to find an element > > in O(log(n)) time without using any extra space. > > > > -- > > **Regards > > SAGAR PAREEK > > COMPUTER SCIENCE AND ENGINEERING > > NIT ALLAHABAD > > -- > 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. > > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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] important question on ADT
thanks all On Fri, Aug 19, 2011 at 11:24 PM, Dipankar Patro wrote: > (c) > > > On 19 August 2011 23:18, sukran dhawan wrote: > >> yes c is the answer.for ex for stack the valid operations are >> push,pop,isempty,peep >> >> >> On Fri, Aug 19, 2011 at 10:57 PM, ghsjgl k wrote: >> >>> An abstract data type is >>> (a) same as abstract class >>> (b) a datatype that cannot be instantiated >>> (c) a datatype for which only the operations defined on it can be used >>> but none else >>> (d) all of the above >>> >>> >>> what is the answer >>> >>> -- >>> 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. >> > > > > -- > > ___ > > Please do not print this e-mail until urgent requirement. Go Green!! > Save Papers <=> Save Trees > > -- > 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: Search an array of unknown length
@Everyone: The problem says that the array is of UNKNOWN length, but all of the solutions presented assume that the array is of INFINITE length. Suppose, e.g., that the length is 987, but you don't know that. Then it will be meaningless to probe at 1, 10, 100, 1000, etc, or 1, 2, 4, ..., 512, 1024 because any probe beyond 987 is outside the array. An address violation may occur, or arbitrary data, unrelated to the data in the array may be used. I think the problem as stated is unsolvable. Dave On Aug 19, 12:48 pm, sagar pareek wrote: > HI, > > I have encountered a problem :- > > You have an array of *UNKNOWN *length . And you have to find an element > in O(log(n)) time without using any extra space. > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD -- 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: probability! tough one to crack!
GOOD one dave and thanks divye for a wonderful explanation On Fri, Aug 19, 2011 at 11:44 PM, DK wrote: > For those of you who want an explanation of Dave's answer, please refer to > the diagram below. > > | 0.5 in |-| 0.5 in | > xxx - > xxx 0.5 in > xxx - > xx...xx | > xx...xx | > xx...xx | > xx...xx | > xxx - > xxx 0.5 in > xxx - > > Since the radius of the coin is 0.5 in, if the center of the coin falls in > the x area, it will cross a grid line. > So, probability of the coin not crossing the grid lines is area of dots / > area of square = (1 inch square / 4 inch square) = 1/4 > > -- > DK > > http://www.divye.in > http://twitter.com/divyekapoor > http://gplus.to/divyekapoor > > -- > 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/-/osMGCscKC70J. > > 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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] Search an array of unknown length
:) On Fri, Aug 19, 2011 at 11:43 PM, Sanjay Rajpal wrote: > Thats wat I said, it depends. Searching in the interval will compensate > reaching the index earlier. > So both are almost equivalent. > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 11:12 AM, sagar pareek wrote: > >> Well i think it depends... >> because range of x and 10x is more than i and 2i >> no doubt multiple of 10 will give us early index but then to find number >> in b/w indexes is more than of 2^i >> >> >> On Fri, Aug 19, 2011 at 11:38 PM, Sanjay Rajpal wrote: >> >>> Multiplication by 10 or 2^i , it depends. >>> >>> Multiplication by 10 will be faster, I think. >>> >>> Sanju >>> :) >>> >>> >>> >>> On Fri, Aug 19, 2011 at 11:05 AM, sagar pareek wrote: >>> hmmm ok i found a solution in which index searching is done by 2^i which is more optimal multiplication by 10 or 2 power i ??i=0,1,2,3. On Fri, Aug 19, 2011 at 11:30 PM, Sanjay Rajpal wrote: > See at each step you are multiplying the index to be compared by > 10(say), this increase is exponential. > Therefore the search is exponential and complexity is log n. Base > depends on the factor by which you are multiplying for the next index to > be > compared. > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 10:57 AM, sagar pareek > wrote: > >> @Sanjay >> yeah its the very basic idea that comes in mind >> but is your index searching log n ? >> i think no !! >> if yes then tell me how? >> >> >> On Fri, Aug 19, 2011 at 11:24 PM, Sanjay Rajpal wrote: >> >>> I forgot to mention one thing, at each comparison, store the index at >>> which we searched previously. >>> >>> Sanju >>> :) >>> >>> >>> >>> On Fri, Aug 19, 2011 at 10:53 AM, Sanjay Rajpal wrote: >>> You can do it very easily. I assume array is sorted and contains integers. Say start at position 1, if value at that index is equal to the value to be found, return index. else if value at that index is greater than the value to be found, we got an interval to search in. else(value at that index is smaller than the value to be found) search at location 10,then 100, then 1000 till you find an interval. Once you find an interval, perform Binary Search on this and get element in O(log n). Got it ? Sanju :) On Fri, Aug 19, 2011 at 10:48 AM, sagar pareek < sagarpar...@gmail.com> wrote: > HI, > > I have encountered a problem :- > > You have an array of *UNKNOWN *length . And you have to find an > element in O(log(n)) time without using any extra space. > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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. >>> >> >> >> >> -- >> **Regards >> SAGAR PAREEK >> COMPUTER SCIENCE AND ENGINEERING >> NIT ALLAHABAD >> >> -- >> 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- You receive
Re: [algogeeks] Re: probability! tough one to crack!
For those of you who want an explanation of Dave's answer, please refer to the diagram below. | 0.5 in |-| 0.5 in | xxx - xxx 0.5 in xxx - xx...xx | xx...xx | xx...xx | xx...xx | xxx - xxx 0.5 in xxx - Since the radius of the coin is 0.5 in, if the center of the coin falls in the x area, it will cross a grid line. So, probability of the coin not crossing the grid lines is area of dots / area of square = (1 inch square / 4 inch square) = 1/4 -- DK http://www.divye.in http://twitter.com/divyekapoor http://gplus.to/divyekapoor -- 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/-/osMGCscKC70J. 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] Search an array of unknown length
Thats wat I said, it depends. Searching in the interval will compensate reaching the index earlier. So both are almost equivalent. Sanju :) On Fri, Aug 19, 2011 at 11:12 AM, sagar pareek wrote: > Well i think it depends... > because range of x and 10x is more than i and 2i > no doubt multiple of 10 will give us early index but then to find number in > b/w indexes is more than of 2^i > > > On Fri, Aug 19, 2011 at 11:38 PM, Sanjay Rajpal wrote: > >> Multiplication by 10 or 2^i , it depends. >> >> Multiplication by 10 will be faster, I think. >> >> Sanju >> :) >> >> >> >> On Fri, Aug 19, 2011 at 11:05 AM, sagar pareek wrote: >> >>> hmmm ok >>> i found a solution in which index searching is done by 2^i >>> which is more optimal >>> multiplication by 10 or 2 power i ??i=0,1,2,3. >>> >>> On Fri, Aug 19, 2011 at 11:30 PM, Sanjay Rajpal wrote: >>> See at each step you are multiplying the index to be compared by 10(say), this increase is exponential. Therefore the search is exponential and complexity is log n. Base depends on the factor by which you are multiplying for the next index to be compared. Sanju :) On Fri, Aug 19, 2011 at 10:57 AM, sagar pareek wrote: > @Sanjay > yeah its the very basic idea that comes in mind > but is your index searching log n ? > i think no !! > if yes then tell me how? > > > On Fri, Aug 19, 2011 at 11:24 PM, Sanjay Rajpal wrote: > >> I forgot to mention one thing, at each comparison, store the index at >> which we searched previously. >> >> Sanju >> :) >> >> >> >> On Fri, Aug 19, 2011 at 10:53 AM, Sanjay Rajpal wrote: >> >>> You can do it very easily. >>> >>> I assume array is sorted and contains integers. >>> >>> Say start at position 1, if value at that index is equal to the value >>> to be found, return index. >>> else if value at that index is greater than the value to be found, we >>> got an interval to search in. >>> else(value at that index is smaller than the value to be found) >>> search at location 10,then 100, then 1000 till you find an >>> interval. >>> >>> Once you find an interval, perform Binary Search on this and get >>> element in O(log n). >>> >>> Got it ? >>> >>> Sanju >>> :) >>> >>> >>> >>> On Fri, Aug 19, 2011 at 10:48 AM, sagar pareek < >>> sagarpar...@gmail.com> wrote: >>> HI, I have encountered a problem :- You have an array of *UNKNOWN *length . And you have to find an element in O(log(n)) time without using any extra space. -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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. >>> >>> >>> >>> -- >>> **Regards >>> SAGAR PAREEK >>> COMPUTER SCIENCE AND ENGINEERING >>> NIT ALLAHABAD >>> >>> -- >>> 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...@goog
Re: [algogeeks] Search an array of unknown length
Well i think it depends... because range of x and 10x is more than i and 2i no doubt multiple of 10 will give us early index but then to find number in b/w indexes is more than of 2^i On Fri, Aug 19, 2011 at 11:38 PM, Sanjay Rajpal wrote: > Multiplication by 10 or 2^i , it depends. > > Multiplication by 10 will be faster, I think. > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 11:05 AM, sagar pareek wrote: > >> hmmm ok >> i found a solution in which index searching is done by 2^i >> which is more optimal >> multiplication by 10 or 2 power i ??i=0,1,2,3. >> >> On Fri, Aug 19, 2011 at 11:30 PM, Sanjay Rajpal wrote: >> >>> See at each step you are multiplying the index to be compared by 10(say), >>> this increase is exponential. >>> Therefore the search is exponential and complexity is log n. Base depends >>> on the factor by which you are multiplying for the next index to be >>> compared. >>> >>> Sanju >>> :) >>> >>> >>> >>> On Fri, Aug 19, 2011 at 10:57 AM, sagar pareek wrote: >>> @Sanjay yeah its the very basic idea that comes in mind but is your index searching log n ? i think no !! if yes then tell me how? On Fri, Aug 19, 2011 at 11:24 PM, Sanjay Rajpal wrote: > I forgot to mention one thing, at each comparison, store the index at > which we searched previously. > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 10:53 AM, Sanjay Rajpal wrote: > >> You can do it very easily. >> >> I assume array is sorted and contains integers. >> >> Say start at position 1, if value at that index is equal to the value >> to be found, return index. >> else if value at that index is greater than the value to be found, we >> got an interval to search in. >> else(value at that index is smaller than the value to be found) >> search at location 10,then 100, then 1000 till you find an >> interval. >> >> Once you find an interval, perform Binary Search on this and get >> element in O(log n). >> >> Got it ? >> >> Sanju >> :) >> >> >> >> On Fri, Aug 19, 2011 at 10:48 AM, sagar pareek > > wrote: >> >>> HI, >>> >>> I have encountered a problem :- >>> >>> You have an array of *UNKNOWN *length . And you have to find an >>> element in O(log(n)) time without using any extra space. >>> >>> -- >>> **Regards >>> SAGAR PAREEK >>> COMPUTER SCIENCE AND ENGINEERING >>> NIT ALLAHABAD >>> >>> -- >>> 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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. >>> >> >> >> >> -- >> **Regards >> SAGAR PAREEK >> COMPUTER SCIENCE AND ENGINEERING >> NIT ALLAHABAD >> >> -- >> 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 optio
Re: [algogeeks] Search an array of unknown length
Multiplication by 10 or 2^i , it depends. Multiplication by 10 will be faster, I think. Sanju :) On Fri, Aug 19, 2011 at 11:05 AM, sagar pareek wrote: > hmmm ok > i found a solution in which index searching is done by 2^i > which is more optimal > multiplication by 10 or 2 power i ??i=0,1,2,3. > > On Fri, Aug 19, 2011 at 11:30 PM, Sanjay Rajpal wrote: > >> See at each step you are multiplying the index to be compared by 10(say), >> this increase is exponential. >> Therefore the search is exponential and complexity is log n. Base depends >> on the factor by which you are multiplying for the next index to be >> compared. >> >> Sanju >> :) >> >> >> >> On Fri, Aug 19, 2011 at 10:57 AM, sagar pareek wrote: >> >>> @Sanjay >>> yeah its the very basic idea that comes in mind >>> but is your index searching log n ? >>> i think no !! >>> if yes then tell me how? >>> >>> >>> On Fri, Aug 19, 2011 at 11:24 PM, Sanjay Rajpal wrote: >>> I forgot to mention one thing, at each comparison, store the index at which we searched previously. Sanju :) On Fri, Aug 19, 2011 at 10:53 AM, Sanjay Rajpal wrote: > You can do it very easily. > > I assume array is sorted and contains integers. > > Say start at position 1, if value at that index is equal to the value > to be found, return index. > else if value at that index is greater than the value to be found, we > got an interval to search in. > else(value at that index is smaller than the value to be found) > search at location 10,then 100, then 1000 till you find an > interval. > > Once you find an interval, perform Binary Search on this and get > element in O(log n). > > Got it ? > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 10:48 AM, sagar pareek > wrote: > >> HI, >> >> I have encountered a problem :- >> >> You have an array of *UNKNOWN *length . And you have to find an >> element in O(log(n)) time without using any extra space. >> >> -- >> **Regards >> SAGAR PAREEK >> COMPUTER SCIENCE AND ENGINEERING >> NIT ALLAHABAD >> >> -- >> 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. >>> >>> >>> >>> -- >>> **Regards >>> SAGAR PAREEK >>> COMPUTER SCIENCE AND ENGINEERING >>> NIT ALLAHABAD >>> >>> -- >>> 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. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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] Search an array of unknown length
yeah now if u know then pls tell which is more optimal? On Fri, Aug 19, 2011 at 11:36 PM, Sanjay Rajpal wrote: > but the logic is same na ? > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 11:05 AM, sagar pareek wrote: > >> hmmm ok >> i found a solution in which index searching is done by 2^i >> which is more optimal >> multiplication by 10 or 2 power i ??i=0,1,2,3. >> >> On Fri, Aug 19, 2011 at 11:30 PM, Sanjay Rajpal wrote: >> >>> See at each step you are multiplying the index to be compared by 10(say), >>> this increase is exponential. >>> Therefore the search is exponential and complexity is log n. Base depends >>> on the factor by which you are multiplying for the next index to be >>> compared. >>> >>> Sanju >>> :) >>> >>> >>> >>> On Fri, Aug 19, 2011 at 10:57 AM, sagar pareek wrote: >>> @Sanjay yeah its the very basic idea that comes in mind but is your index searching log n ? i think no !! if yes then tell me how? On Fri, Aug 19, 2011 at 11:24 PM, Sanjay Rajpal wrote: > I forgot to mention one thing, at each comparison, store the index at > which we searched previously. > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 10:53 AM, Sanjay Rajpal wrote: > >> You can do it very easily. >> >> I assume array is sorted and contains integers. >> >> Say start at position 1, if value at that index is equal to the value >> to be found, return index. >> else if value at that index is greater than the value to be found, we >> got an interval to search in. >> else(value at that index is smaller than the value to be found) >> search at location 10,then 100, then 1000 till you find an >> interval. >> >> Once you find an interval, perform Binary Search on this and get >> element in O(log n). >> >> Got it ? >> >> Sanju >> :) >> >> >> >> On Fri, Aug 19, 2011 at 10:48 AM, sagar pareek > > wrote: >> >>> HI, >>> >>> I have encountered a problem :- >>> >>> You have an array of *UNKNOWN *length . And you have to find an >>> element in O(log(n)) time without using any extra space. >>> >>> -- >>> **Regards >>> SAGAR PAREEK >>> COMPUTER SCIENCE AND ENGINEERING >>> NIT ALLAHABAD >>> >>> -- >>> 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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. >>> >> >> >> >> -- >> **Regards >> SAGAR PAREEK >> COMPUTER SCIENCE AND ENGINEERING >> NIT ALLAHABAD >> >> -- >> 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- You received this message because you
Re: [algogeeks] Search an array of unknown length
but the logic is same na ? Sanju :) On Fri, Aug 19, 2011 at 11:05 AM, sagar pareek wrote: > hmmm ok > i found a solution in which index searching is done by 2^i > which is more optimal > multiplication by 10 or 2 power i ??i=0,1,2,3. > > On Fri, Aug 19, 2011 at 11:30 PM, Sanjay Rajpal wrote: > >> See at each step you are multiplying the index to be compared by 10(say), >> this increase is exponential. >> Therefore the search is exponential and complexity is log n. Base depends >> on the factor by which you are multiplying for the next index to be >> compared. >> >> Sanju >> :) >> >> >> >> On Fri, Aug 19, 2011 at 10:57 AM, sagar pareek wrote: >> >>> @Sanjay >>> yeah its the very basic idea that comes in mind >>> but is your index searching log n ? >>> i think no !! >>> if yes then tell me how? >>> >>> >>> On Fri, Aug 19, 2011 at 11:24 PM, Sanjay Rajpal wrote: >>> I forgot to mention one thing, at each comparison, store the index at which we searched previously. Sanju :) On Fri, Aug 19, 2011 at 10:53 AM, Sanjay Rajpal wrote: > You can do it very easily. > > I assume array is sorted and contains integers. > > Say start at position 1, if value at that index is equal to the value > to be found, return index. > else if value at that index is greater than the value to be found, we > got an interval to search in. > else(value at that index is smaller than the value to be found) > search at location 10,then 100, then 1000 till you find an > interval. > > Once you find an interval, perform Binary Search on this and get > element in O(log n). > > Got it ? > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 10:48 AM, sagar pareek > wrote: > >> HI, >> >> I have encountered a problem :- >> >> You have an array of *UNKNOWN *length . And you have to find an >> element in O(log(n)) time without using any extra space. >> >> -- >> **Regards >> SAGAR PAREEK >> COMPUTER SCIENCE AND ENGINEERING >> NIT ALLAHABAD >> >> -- >> 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. >>> >>> >>> >>> -- >>> **Regards >>> SAGAR PAREEK >>> COMPUTER SCIENCE AND ENGINEERING >>> NIT ALLAHABAD >>> >>> -- >>> 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. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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] Search an array of unknown length
hmmm ok i found a solution in which index searching is done by 2^i which is more optimal multiplication by 10 or 2 power i ??i=0,1,2,3. On Fri, Aug 19, 2011 at 11:30 PM, Sanjay Rajpal wrote: > See at each step you are multiplying the index to be compared by 10(say), > this increase is exponential. > Therefore the search is exponential and complexity is log n. Base depends > on the factor by which you are multiplying for the next index to be > compared. > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 10:57 AM, sagar pareek wrote: > >> @Sanjay >> yeah its the very basic idea that comes in mind >> but is your index searching log n ? >> i think no !! >> if yes then tell me how? >> >> >> On Fri, Aug 19, 2011 at 11:24 PM, Sanjay Rajpal wrote: >> >>> I forgot to mention one thing, at each comparison, store the index at >>> which we searched previously. >>> >>> Sanju >>> :) >>> >>> >>> >>> On Fri, Aug 19, 2011 at 10:53 AM, Sanjay Rajpal wrote: >>> You can do it very easily. I assume array is sorted and contains integers. Say start at position 1, if value at that index is equal to the value to be found, return index. else if value at that index is greater than the value to be found, we got an interval to search in. else(value at that index is smaller than the value to be found) search at location 10,then 100, then 1000 till you find an interval. Once you find an interval, perform Binary Search on this and get element in O(log n). Got it ? Sanju :) On Fri, Aug 19, 2011 at 10:48 AM, sagar pareek wrote: > HI, > > I have encountered a problem :- > > You have an array of *UNKNOWN *length . And you have to find an > element in O(log(n)) time without using any extra space. > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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. >>> >> >> >> >> -- >> **Regards >> SAGAR PAREEK >> COMPUTER SCIENCE AND ENGINEERING >> NIT ALLAHABAD >> >> -- >> 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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] Search an array of unknown length
See at each step you are multiplying the index to be compared by 10(say), this increase is exponential. Therefore the search is exponential and complexity is log n. Base depends on the factor by which you are multiplying for the next index to be compared. Sanju :) On Fri, Aug 19, 2011 at 10:57 AM, sagar pareek wrote: > @Sanjay > yeah its the very basic idea that comes in mind > but is your index searching log n ? > i think no !! > if yes then tell me how? > > > On Fri, Aug 19, 2011 at 11:24 PM, Sanjay Rajpal wrote: > >> I forgot to mention one thing, at each comparison, store the index at >> which we searched previously. >> >> Sanju >> :) >> >> >> >> On Fri, Aug 19, 2011 at 10:53 AM, Sanjay Rajpal wrote: >> >>> You can do it very easily. >>> >>> I assume array is sorted and contains integers. >>> >>> Say start at position 1, if value at that index is equal to the value to >>> be found, return index. >>> else if value at that index is greater than the value to be found, we got >>> an interval to search in. >>> else(value at that index is smaller than the value to be found) >>> search at location 10,then 100, then 1000 till you find an interval. >>> >>> Once you find an interval, perform Binary Search on this and get element >>> in O(log n). >>> >>> Got it ? >>> >>> Sanju >>> :) >>> >>> >>> >>> On Fri, Aug 19, 2011 at 10:48 AM, sagar pareek wrote: >>> HI, I have encountered a problem :- You have an array of *UNKNOWN *length . And you have to find an element in O(log(n)) time without using any extra space. -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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] Search an array of unknown length
@Sanjay yeah its the very basic idea that comes in mind but is your index searching log n ? i think no !! if yes then tell me how? On Fri, Aug 19, 2011 at 11:24 PM, Sanjay Rajpal wrote: > I forgot to mention one thing, at each comparison, store the index at which > we searched previously. > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 10:53 AM, Sanjay Rajpal wrote: > >> You can do it very easily. >> >> I assume array is sorted and contains integers. >> >> Say start at position 1, if value at that index is equal to the value to >> be found, return index. >> else if value at that index is greater than the value to be found, we got >> an interval to search in. >> else(value at that index is smaller than the value to be found) >> search at location 10,then 100, then 1000 till you find an interval. >> >> Once you find an interval, perform Binary Search on this and get element >> in O(log n). >> >> Got it ? >> >> Sanju >> :) >> >> >> >> On Fri, Aug 19, 2011 at 10:48 AM, sagar pareek wrote: >> >>> HI, >>> >>> I have encountered a problem :- >>> >>> You have an array of *UNKNOWN *length . And you have to find an >>> element in O(log(n)) time without using any extra space. >>> >>> -- >>> **Regards >>> SAGAR PAREEK >>> COMPUTER SCIENCE AND ENGINEERING >>> NIT ALLAHABAD >>> >>> -- >>> 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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: Adobe Interview Puzzles Urgent !!
I don't know the answer since my friend who had given the interview was not able to answer the questions . But remember its a SPHERE so think in 3-D rather then 2-D and also please give the logic behind your answer . -- 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/-/bXosLfEakFkJ. 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] important question on ADT
(c) On 19 August 2011 23:18, sukran dhawan wrote: > yes c is the answer.for ex for stack the valid operations are > push,pop,isempty,peep > > > On Fri, Aug 19, 2011 at 10:57 PM, ghsjgl k wrote: > >> An abstract data type is >> (a) same as abstract class >> (b) a datatype that cannot be instantiated >> (c) a datatype for which only the operations defined on it can be used but >> none else >> (d) all of the above >> >> >> what is the answer >> >> -- >> 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. > -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers <=> Save Trees -- 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] Search an array of unknown length
I forgot to mention one thing, at each comparison, store the index at which we searched previously. Sanju :) On Fri, Aug 19, 2011 at 10:53 AM, Sanjay Rajpal wrote: > You can do it very easily. > > I assume array is sorted and contains integers. > > Say start at position 1, if value at that index is equal to the value to be > found, return index. > else if value at that index is greater than the value to be found, we got > an interval to search in. > else(value at that index is smaller than the value to be found) > search at location 10,then 100, then 1000 till you find an interval. > > Once you find an interval, perform Binary Search on this and get element in > O(log n). > > Got it ? > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 10:48 AM, sagar pareek wrote: > >> HI, >> >> I have encountered a problem :- >> >> You have an array of *UNKNOWN *length . And you have to find an element >> in O(log(n)) time without using any extra space. >> >> -- >> **Regards >> SAGAR PAREEK >> COMPUTER SCIENCE AND ENGINEERING >> NIT ALLAHABAD >> >> -- >> 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] Search an array of unknown length
You can do it very easily. I assume array is sorted and contains integers. Say start at position 1, if value at that index is equal to the value to be found, return index. else if value at that index is greater than the value to be found, we got an interval to search in. else(value at that index is smaller than the value to be found) search at location 10,then 100, then 1000 till you find an interval. Once you find an interval, perform Binary Search on this and get element in O(log n). Got it ? Sanju :) On Fri, Aug 19, 2011 at 10:48 AM, sagar pareek wrote: > HI, > > I have encountered a problem :- > > You have an array of *UNKNOWN *length . And you have to find an element > in O(log(n)) time without using any extra space. > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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] important question on ADT
yes c is the answer.for ex for stack the valid operations are push,pop,isempty,peep On Fri, Aug 19, 2011 at 10:57 PM, ghsjgl k wrote: > An abstract data type is > (a) same as abstract class > (b) a datatype that cannot be instantiated > (c) a datatype for which only the operations defined on it can be used but > none else > (d) all of the above > > > what is the answer > > -- > 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] Search an array of unknown length
HI, I have encountered a problem :- You have an array of *UNKNOWN *length . And you have to find an element in O(log(n)) time without using any extra space. -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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] important question on ADT
yes!! c is the correct answer. On Fri, Aug 19, 2011 at 11:10 PM, Sanjay Rajpal wrote: > I think c is the answer. > > Sanju > :) > > > > On Fri, Aug 19, 2011 at 10:27 AM, ghsjgl k wrote: > >> An abstract data type is >> (a) same as abstract class >> (b) a datatype that cannot be instantiated >> (c) a datatype for which only the operations defined on it can be used but >> none else >> (d) all of the above >> >> >> what is the answer >> >> -- >> 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. > -- 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] important question on ADT
I think c is the answer. Sanju :) On Fri, Aug 19, 2011 at 10:27 AM, ghsjgl k wrote: > An abstract data type is > (a) same as abstract class > (b) a datatype that cannot be instantiated > (c) a datatype for which only the operations defined on it can be used but > none else > (d) all of the above > > > what is the answer > > -- > 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: probability! tough one to crack!
got it. Sanju :) On Fri, Aug 19, 2011 at 10:25 AM, Romil ... wrote: > Because this is the answer. Rest of the times it will not touch any of the > grid lines. > > > On Fri, Aug 19, 2011 at 10:50 PM, priya ramesh < > love.for.programm...@gmail.com> wrote: > >> why this sentence?? >> >> "3/4 of >> the time the coin will touch a grid line"?? >> >> -- >> 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. >> > > > > -- > Romil > > > -- > 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] important question on ADT
An abstract data type is (a) same as abstract class (b) a datatype that cannot be instantiated (c) a datatype for which only the operations defined on it can be used but none else (d) all of the above what is the answer -- 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: probability! tough one to crack!
Because this is the answer. Rest of the times it will not touch any of the grid lines. On Fri, Aug 19, 2011 at 10:50 PM, priya ramesh < love.for.programm...@gmail.com> wrote: > why this sentence?? > > "3/4 of > the time the coin will touch a grid line"?? > > -- > 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. > -- Romil -- 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: probability! tough one to crack!
why this sentence?? "3/4 of the time the coin will touch a grid line"?? -- 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: probability! tough one to crack!
The requirements will be satisfied if the centre of the coin is such that the coin just touches the square. This is possible only when the centre of coin is in a smaller square of 1 inch side. Hence the result. On Fri, Aug 19, 2011 at 10:41 PM, Sanjay Rajpal wrote: > @Dave : me too didnt get the meaning you want to convey, plz throw some > light. > > Sanjay Kumar > B.Tech Final Year > Department of Computer Engineering > National Institute of Technology Kurukshetra > Kurukshetra - 136119 > Haryana, India > > > > > On Fri, Aug 19, 2011 at 10:09 AM, priya ramesh < > love.for.programm...@gmail.com> wrote: > >> @dave: You are great!! The ans is indeed 1/4. >> >> I dint understand this sentence... >> >> "The area of the region >> within 1/2 inch of the boundary is 3 square inches." >> >> -- >> 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. > -- Romil -- 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: Adobe Interview Puzzles Urgent !!
[root(2)-1]/2*r ? On Fri, Aug 19, 2011 at 9:23 PM, Greeshma wrote: > ya tats d ans i got.. > > -- > 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/-/VRqgtJewfHsJ. > > 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. > -- Nikhil Gupta Senior Co-ordinator, Publicity CSI, NSIT Students' Branch NSIT, New Delhi, India -- 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: probability! tough one to crack!
@Dave : me too didnt get the meaning you want to convey, plz throw some light. Sanjay Kumar B.Tech Final Year Department of Computer Engineering National Institute of Technology Kurukshetra Kurukshetra - 136119 Haryana, India On Fri, Aug 19, 2011 at 10:09 AM, priya ramesh < love.for.programm...@gmail.com> wrote: > @dave: You are great!! The ans is indeed 1/4. > > I dint understand this sentence... > > "The area of the region > within 1/2 inch of the boundary is 3 square inches." > > -- > 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: probability! tough one to crack!
@dave: You are great!! The ans is indeed 1/4. I dint understand this sentence... "The area of the region within 1/2 inch of the boundary is 3 square inches." -- 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: probability! tough one to crack!
@Priya: Consider one of the squares in the grid. It has an area of 4 square inches. If the coin lands so that its center is within 1/2 inch of any grid line, the coin will touch the line. The area of the region within 1/2 inch of the boundary is 3 square inches. Therefore, 3/4 of the time the coin will touch a grid line, leaving 1/4 as the probability of not touching any of the grid lines. Dave On Aug 19, 11:50 am, priya ramesh wrote: > A 1 inch diameter coin is thrown on a table covered with a grid of lines two > inches apart. What is the probability the coin lands in a square without > touching any of the lines of the grid? -- 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: netapp!
@saurabh: thanks a lot! isn't DBMS important?? -- 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] probability! tough one to crack!
area of coin = pie * 1^2 = n(e) area of square= 2^2 * 4(as there are four such squares)= n(S) probablility = n(E)/n(S) = pie/16 . the ans ;) On Fri, Aug 19, 2011 at 10:20 PM, priya ramesh < love.for.programm...@gmail.com> wrote: > A 1 inch diameter coin is thrown on a table covered with a grid of lines > two inches apart. What is the probability the coin lands in a square without > touching any of the lines of the grid? > > -- > 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 MCA -- 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: netapp!
Os and n/w ,ds ,c and c++, apti were 4 sections each had individual cut off On Aug 19, 5:25 pm, sukran dhawan wrote: > which college ? > > On Fri, Aug 19, 2011 at 5:54 PM, priya ramesh < > > love.for.programm...@gmail.com> wrote: > > on what subjects are questions asked in netapp?? (Both written and tech > > interview) > > Plz help > > > -- > > 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] probability! tough one to crack!
A 1 inch diameter coin is thrown on a table covered with a grid of lines two inches apart. What is the probability the coin lands in a square without touching any of the lines of the grid? -- 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]
+1 sagar! i too have the same answer :) -- 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] Answer these ques !!
what do you mean by "return the value at each node in order of the corresponding keys"?? Plz give an example -- 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] Puzzle
this qn is copy pastewd as it is...no further instructions etc provided On Fri, Aug 19, 2011 at 6:06 PM, priya ramesh < love.for.programm...@gmail.com> wrote: > i think the question should be elaborated a li'l more. Plz give the > sentences given in the puzzle. May be we cud solve then > > -- > 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] iitiam systems????
iitiam systems is coming to our college.what kind of questions is asked in the first round?please reply if anyone knows -- 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: calculate a/b without using ‘*’, ‘/’’ and ‘%’
@Sanjay: Just think about doing long division with paper and pencil. Then implement it in binary. If you look at my code, which was posted and corrected earlier in this thread, you will see that both the while loop and the for loop iterate approximately log_2(quotient) times, log_2(quotient) being approximately the number of bits in the quotient. Dave On Aug 19, 11:10 am, Sanjay Rajpal wrote: > @Dave : How did you approach this solution to this problem ? > and how you saw that th complexity is O(log_2(Quotient)) ? > > *Regards > > Sanju > > Happy to Help :)* > > > > On Fri, Aug 19, 2011 at 8:44 AM, Dave wrote: > > @Sanjay: Shashank was just reiterating what I said in > >http://groups.google.com/group/algogeeks/msg/8590f8a2a8408d93. The > > algorithm Shashank described is what I had previously provided code > > for inhttp://groups.google.com/group/algogeeks/msg/735671f6a1e16eec, > > with a correction in > >http://groups.google.com/group/algogeeks/msg/6b064081b7ba86f0. > > As far as determining the complexity, you can see that both the while > > loop and the for loop in my code iterate approximately log_2(quotient) > > times, which is what makes the code O(log(quotient)). > > > Dave > > > On Aug 19, 6:46 am, Sanjay Rajpal wrote: > > > @Shashank : Would you throw some light on how you determined the > > complexity > > > ? > > > > *Regards > > > > Sanju > > > > Happy to Help :)* > > > > On Fri, Aug 19, 2011 at 2:36 AM, WgpShashank > >wrote: > > > > > We can use bit logic to reduce the time complexity to O(logn) where n > > is > > > > Quotient > > > > > Algorithm will be as follow as we know > > > > > 1. Left shifting an unsigned number by 1 multiplies that number by 2. > > > > 2. Right shifting an unsigned number by 1 divides that number by 2. > > > > > Therefore the procedure for the division algorithm, given a dividend > > and a > > > > divisor . > > > > core logic will be to left shift (multiply by 2) untill its greater > > then > > > > dividend , then continue this routine with the the difference between > > the > > > > dividend and divisor and divisor till the point where dividend is less > > than > > > > divisor or their difference is zero. > > > > > Lets see one example: dividend=23 divisor=3 > > > > > then left shift for 3 i.e 3 will converted to3, 6,12,24,… since 12 <23 > > > > hence now dividend is 11 and quotient in 4(two time shift operation) > > now > > > > again 3,6,12.. 6<11 hence dividend is 11-6=5 and quotient =4+2=6 now > > only > > > > 3<5 hence remainder =2 quotient =6+1=7 so answer. > > > > > Time Complexity O(logn) Number of bits in Quotient > > > > > Correct me if anything wrong > > > > > *Thanks > > > > Shashank Mani > > > > Computer Science > > > > Birla Institute of Technology Mesra* > > > > > -- > > > > 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/-/VszScC-sOfoJ. > > > > > 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.
Re: [algogeeks]
thanks On Fri, Aug 19, 2011 at 9:50 PM, sagar pareek wrote: > well we can take anything as he stated in any order > > > On Fri, Aug 19, 2011 at 9:49 PM, Abhishek Yadav < > algowithabhis...@gmail.com> wrote: > >> Hey try queue instead of stack >> >> >> On Fri, Aug 19, 2011 at 9:47 PM, sagar pareek wrote: >> >>> traverse the list and print only odd numbers and if even number encounter >>> store it in a stack and later on print it >>> >>> On Fri, Aug 19, 2011 at 9:29 PM, sukran dhawan >>> wrote: >>> There is a Circular Singly Linked List with n nodes having sorted values from 1 to n. Need to print the odd and even numbers in groups in a single traversal. Eg. Input: 1->2->3->4->5->6->1 Output: {Any combination of Odd Nos} {Any combination of Even Nos} Eg. 1 3 5 6 4 2. write a program for same? -- 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. >>> >>> >>> >>> -- >>> **Regards >>> SAGAR PAREEK >>> COMPUTER SCIENCE AND ENGINEERING >>> NIT ALLAHABAD >>> >>> -- >>> 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. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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]
well we can take anything as he stated in any order On Fri, Aug 19, 2011 at 9:49 PM, Abhishek Yadav wrote: > Hey try queue instead of stack > > > On Fri, Aug 19, 2011 at 9:47 PM, sagar pareek wrote: > >> traverse the list and print only odd numbers and if even number encounter >> store it in a stack and later on print it >> >> On Fri, Aug 19, 2011 at 9:29 PM, sukran dhawan wrote: >> >>> There is a Circular Singly Linked List with n nodes having sorted values >>> from 1 to n. Need to print the odd and even numbers in groups in a single >>> traversal. >>> Eg. Input: 1->2->3->4->5->6->1 Output: {Any combination of Odd Nos} {Any >>> combination of Even Nos} Eg. 1 3 5 6 4 2. write a program for same? >>> >>> -- >>> 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. >>> >> >> >> >> -- >> **Regards >> SAGAR PAREEK >> COMPUTER SCIENCE AND ENGINEERING >> NIT ALLAHABAD >> >> -- >> 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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]
we have to store even no.s in a Queue instead of stack . *Regards Sanju Happy to Help :)* On Fri, Aug 19, 2011 at 9:17 AM, sagar pareek wrote: > traverse the list and print only odd numbers and if even number encounter > store it in a stack and later on print it > > > On Fri, Aug 19, 2011 at 9:29 PM, sukran dhawan wrote: > >> There is a Circular Singly Linked List with n nodes having sorted values >> from 1 to n. Need to print the odd and even numbers in groups in a single >> traversal. >> Eg. Input: 1->2->3->4->5->6->1 Output: {Any combination of Odd Nos} {Any >> combination of Even Nos} Eg. 1 3 5 6 4 2. write a program for same? >> >> -- >> 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. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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]
Hey try queue instead of stack On Fri, Aug 19, 2011 at 9:47 PM, sagar pareek wrote: > traverse the list and print only odd numbers and if even number encounter > store it in a stack and later on print it > > On Fri, Aug 19, 2011 at 9:29 PM, sukran dhawan wrote: > >> There is a Circular Singly Linked List with n nodes having sorted values >> from 1 to n. Need to print the odd and even numbers in groups in a single >> traversal. >> Eg. Input: 1->2->3->4->5->6->1 Output: {Any combination of Odd Nos} {Any >> combination of Even Nos} Eg. 1 3 5 6 4 2. write a program for same? >> >> -- >> 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. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > 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]
traverse the list and print only odd numbers and if even number encounter store it in a stack and later on print it On Fri, Aug 19, 2011 at 9:29 PM, sukran dhawan wrote: > There is a Circular Singly Linked List with n nodes having sorted values > from 1 to n. Need to print the odd and even numbers in groups in a single > traversal. > Eg. Input: 1->2->3->4->5->6->1 Output: {Any combination of Odd Nos} {Any > combination of Even Nos} Eg. 1 3 5 6 4 2. write a program for same? > > -- > 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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] Answer these ques !!
ok i got it!! oracle apps !! :D :D actually i got it from ur last post of bianry tree question :) :) On Fri, Aug 19, 2011 at 9:38 PM, sagar pareek wrote: > ok nair so tell me from where u found these questions? > > > On Fri, Aug 19, 2011 at 9:19 PM, jestincobol nair > wrote: > >> A binary search tree is defined as follows. >> >> Each node has a key, a value, a (possibly null) left child, and a >> (possibly null) right child. >> An ordering is defined on the keys to be stored in the tree. >> For a given node nd, the keys of all the nodes in its left subtree are >> “before” nd’s key, and the keys of all the nodes in its right subtree are >> “after” nd’s key. >> The depth of the root node is defined to be 0; the depth of any other >> node is 1 more than the depth of its parent. >> >> How would the next() function of a binary search tree’s iterator be >> defined, assuming no changes are made to the tree while the iterator is >> active? >> >> Note: next() should return the value at each node in order of the >> corresponding keys; also, assume for each answer that the iterator has been >> appropriately initialized before the first call to next(). >> >> 1. using a queue: >> >>nd = q.remove() >>q.add(nd.leftChild) >>a.qdd(nd.rightChild) >>return nd.value >> >> 2. using a stack: >> >>nd = stk.remove() >>stk.add(nd.leftChild) >>stk.add(nd.rightChild) >>return nd.value >> >> 3. using a stack: >> >>nd = stk.remove() >>nxt = nd.getRight() >>while (null != nxt) { stk.push(nxt); nxt = nxt.getLeft(); } >>return nd.value >> >> >> >> 1 is correct >> >> >> 2 is correct >> >> >> 3 is correct >> >> >> None of these >> >> >> plz say ur answers for this ?? >> >> >> On Fri, Aug 19, 2011 at 9:18 PM, jestincobol nair >> wrote: >> >>> @ sagar:no dude !! dese are of not of citrix :) >>> >>> >>> On Fri, Aug 19, 2011 at 9:14 PM, sagar pareek wrote: >>> @nair Are these questions of CITRIX? coz all these questions i already faced somewhere On Fri, Aug 19, 2011 at 9:12 PM, priya ramesh < love.for.programm...@gmail.com> wrote: > 5th is option 1 sorry > > -- > 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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: calculate a/b without using ‘*’, ‘/’’ and ‘%’
@Dave : How did you approach this solution to this problem ? and how you saw that th complexity is O(log_2(Quotient)) ? *Regards Sanju Happy to Help :)* On Fri, Aug 19, 2011 at 8:44 AM, Dave wrote: > @Sanjay: Shashank was just reiterating what I said in > http://groups.google.com/group/algogeeks/msg/8590f8a2a8408d93. The > algorithm Shashank described is what I had previously provided code > for in http://groups.google.com/group/algogeeks/msg/735671f6a1e16eec, > with a correction in > http://groups.google.com/group/algogeeks/msg/6b064081b7ba86f0. > As far as determining the complexity, you can see that both the while > loop and the for loop in my code iterate approximately log_2(quotient) > times, which is what makes the code O(log(quotient)). > > Dave > > On Aug 19, 6:46 am, Sanjay Rajpal wrote: > > @Shashank : Would you throw some light on how you determined the > complexity > > ? > > > > *Regards > > > > Sanju > > > > Happy to Help :)* > > > > On Fri, Aug 19, 2011 at 2:36 AM, WgpShashank >wrote: > > > > > > > > > We can use bit logic to reduce the time complexity to O(logn) where n > is > > > Quotient > > > > > Algorithm will be as follow as we know > > > > > 1. Left shifting an unsigned number by 1 multiplies that number by 2. > > > 2. Right shifting an unsigned number by 1 divides that number by 2. > > > > > Therefore the procedure for the division algorithm, given a dividend > and a > > > divisor . > > > core logic will be to left shift (multiply by 2) untill its greater > then > > > dividend , then continue this routine with the the difference between > the > > > dividend and divisor and divisor till the point where dividend is less > than > > > divisor or their difference is zero. > > > > > Lets see one example: dividend=23 divisor=3 > > > > > then left shift for 3 i.e 3 will converted to3, 6,12,24,… since 12 <23 > > > hence now dividend is 11 and quotient in 4(two time shift operation) > now > > > again 3,6,12.. 6<11 hence dividend is 11-6=5 and quotient =4+2=6 now > only > > > 3<5 hence remainder =2 quotient =6+1=7 so answer. > > > > > Time Complexity O(logn) Number of bits in Quotient > > > > > Correct me if anything wrong > > > > > *Thanks > > > Shashank Mani > > > Computer Science > > > Birla Institute of Technology Mesra* > > > > > -- > > > 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/-/VszScC-sOfoJ. > > > > > 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.
Re: [algogeeks] Answer these ques !!
ok nair so tell me from where u found these questions? On Fri, Aug 19, 2011 at 9:19 PM, jestincobol nair wrote: > A binary search tree is defined as follows. > > Each node has a key, a value, a (possibly null) left child, and a > (possibly null) right child. > An ordering is defined on the keys to be stored in the tree. > For a given node nd, the keys of all the nodes in its left subtree are > “before” nd’s key, and the keys of all the nodes in its right subtree are > “after” nd’s key. > The depth of the root node is defined to be 0; the depth of any other > node is 1 more than the depth of its parent. > > How would the next() function of a binary search tree’s iterator be > defined, assuming no changes are made to the tree while the iterator is > active? > > Note: next() should return the value at each node in order of the > corresponding keys; also, assume for each answer that the iterator has been > appropriately initialized before the first call to next(). > > 1. using a queue: > >nd = q.remove() >q.add(nd.leftChild) >a.qdd(nd.rightChild) >return nd.value > > 2. using a stack: > >nd = stk.remove() >stk.add(nd.leftChild) >stk.add(nd.rightChild) >return nd.value > > 3. using a stack: > >nd = stk.remove() >nxt = nd.getRight() >while (null != nxt) { stk.push(nxt); nxt = nxt.getLeft(); } >return nd.value > > > > 1 is correct > > > 2 is correct > > > 3 is correct > > > None of these > > > plz say ur answers for this ?? > > > On Fri, Aug 19, 2011 at 9:18 PM, jestincobol nair > wrote: > >> @ sagar:no dude !! dese are of not of citrix :) >> >> >> On Fri, Aug 19, 2011 at 9:14 PM, sagar pareek wrote: >> >>> @nair >>> Are these questions of CITRIX? >>> >>> coz all these questions i already faced somewhere >>> >>> >>> On Fri, Aug 19, 2011 at 9:12 PM, priya ramesh < >>> love.for.programm...@gmail.com> wrote: >>> 5th is option 1 sorry -- 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. >>> >>> >>> >>> -- >>> **Regards >>> SAGAR PAREEK >>> COMPUTER SCIENCE AND ENGINEERING >>> NIT ALLAHABAD >>> >>> -- >>> 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. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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] Directi
search the archives ... direct i's questions already discussed many times On Fri, Aug 19, 2011 at 9:33 PM, Agyat wrote: > Hi, friends > tom i m having directi written test followed by coding(ol) and written > test is eliminative and i need ur help.What does directi ask in > written and what type ques from which subject and what level of quest > both in written and ol coding round > > -- > 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. > > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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] Directi
Hi, friends tom i m having directi written test followed by coding(ol) and written test is eliminative and i need ur help.What does directi ask in written and what type ques from which subject and what level of quest both in written and ol coding round -- 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]
There is a Circular Singly Linked List with n nodes having sorted values from 1 to n. Need to print the odd and even numbers in groups in a single traversal. Eg. Input: 1->2->3->4->5->6->1 Output: {Any combination of Odd Nos} {Any combination of Even Nos} Eg. 1 3 5 6 4 2. write a program for same? -- 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.