[algogeeks] [Off topic]Privacy Policies in gmail
Hi, I wanted to know if Google is reading the mails sent by us. Because they provide special services to companies when paid with good amounts. Was reading on web, that policies have changed and they can read whatever they want. Shady -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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: [Off topic]Privacy Policies in gmail
got the answer, they do. On Wed, Aug 22, 2012 at 7:59 PM, shady sinv...@gmail.com wrote: Hi, I wanted to know if Google is reading the mails sent by us. Because they provide special services to companies when paid with good amounts. Was reading on web, that policies have changed and they can read whatever they want. Shady -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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: [Off topic]Privacy Policies in gmail
@all they might use all the info n someone else can publish his book on algorithm problems -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Snapdeal Paper Pattern
Anyone know the paper pattern or ques of snapdeal? And What they demand(any specific language)? -- Regards: *Arun Kindra* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Hii
On 08/14/2012 05:56 PM, ragavenderan venkatesan wrote: Given Xor of 3 numbers, How can we derive back those 3 numbers? Can any one explain with an example? maybe you're just making the wrong question :) x = 1 y = 2 x = x XOR y y = y XOR x x = x XOR y what happens? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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]
@wladimar, the value of 2 power 31 is 2147483648... but the integer range is -2147483648 to 2147483647... when you trying to print the 2 power 31 it gives you the value -2147483648 due to exceeding th limit of an signed int.. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Hii
@MH: What happens is that it does not answer the given question. Dave On Wednesday, August 22, 2012 1:00:53 PM UTC-5, The Mad Hatter wrote: On 08/14/2012 05:56 PM, ragavenderan venkatesan wrote: Given Xor of 3 numbers, How can we derive back those 3 numbers? Can any one explain with an example? maybe you're just making the wrong question :) x = 1 y = 2 x = x XOR y y = y XOR x x = x XOR y what happens? -- 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/-/2hRCLd21O0wJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] JAVA PROGRAM ERROR
U r passing x in the method stringTimes and in loop there is 'n' .. so complier error :P make it x and u'll get HiHi On Wed, Aug 22, 2012 at 2:36 AM, Rohit Singhal rsinghal.it...@gmail.comwrote: what error it is showing On Wed, Aug 22, 2012 at 12:41 AM, Rajesh Kumar testalgori...@gmail.comwrote: class StringTimes { public static void main(String args[]) { String str=Hi; long i=2; String get; get=stringTimes(str,i); System.out.println(get); } public static String stringTimes(String str,long x) { int i; String set=str; for(i=0;in-1;i++) { set+=str; } return set; } } OUTPUT should be like:HiHi but it gives error plz someone help me -- Regards Rajesh Kumar -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Rohit Singhal 09211931609 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] JAVA PROGRAM ERROR
Error : U didnt declare the variable n in stringTimes function . Just replace x with n . U'll get the answer . On Wed, Aug 22, 2012 at 12:41 AM, Rajesh Kumar testalgori...@gmail.comwrote: class StringTimes { public static void main(String args[]) { String str=Hi; long i=2; String get; get=stringTimes(str,i); System.out.println(get); } public static String stringTimes(String str,long x) { int i; String set=str; for(i=0;in-1;i++) { set+=str; } return set; } } OUTPUT should be like:HiHi but it gives error plz someone help me -- Regards Rajesh Kumar -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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: question
Thanks Dave sir ! On Wed, Aug 22, 2012 at 3:47 AM, Dave dave_and_da...@juno.com wrote: @Megha: Answered in one line of code in the post https://groups.google.com/d/msg/algogeeks/Fa-5AQR3ACU/jlmjb_nEZCsJ, which also contains a link to an explanation of how the algorithm works. Dave On Tuesday, August 21, 2012 8:23:21 AM UTC-5, megha agrawal wrote: Can anyone suggest solution for this problem? You are given an unsigned integer.Write a function to print the next number which will be having same number of 1 bits present in given num. eg) 6(110) to 9(1001) -- 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/-/F8_qYQin6_MJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] JAVA PROGRAM ERROR
Jsut Change in for(i=0;in-1;i++) put x in pace of n in stringTimes () On Wed, Aug 22, 2012 at 2:36 AM, Rohit Singhal rsinghal.it...@gmail.comwrote: what error it is showing On Wed, Aug 22, 2012 at 12:41 AM, Rajesh Kumar testalgori...@gmail.comwrote: class StringTimes { public static void main(String args[]) { String str=Hi; long i=2; String get; get=stringTimes(str,i); System.out.println(get); } public static String stringTimes(String str,long x) { int i; String set=str; for(i=0;in-1;i++) { set+=str; } return set; } } OUTPUT should be like:HiHi but it gives error plz someone help me -- Regards Rajesh Kumar -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Rohit Singhal 09211931609 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Madhukar Bharti -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] question
Convert the integer to a binary string. From the right (that is least significant bit), find the first occurence of 01 in the string. For example.. if the string is *00110 **01 **11100*, notice the isolated part, that is what you have to find. Then simply flip the 01 to 10.. like *00110* *10**11100.* And then move all the 1's that you skipped to the right.. like *00110**10**00111* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] JAVA PROGRAM ERROR
it should be x - 1 not n - 1 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] O(n) solution is there or not!!
@Carl-At each step you are calculating lcp between the text and the last entry probably to compare ... lcp[i+1]..is it linear still -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Duplicate file in all computers in a network
A network of N computers is such that each computer is connected to every other.Transferring one byte of information between two computers takes one unit of time. In the beginning, a file resides on only one computer on the network. The size of the file is M bytes. Come up with a strategy to duplicate this file across all N machines {that is each machine should have a local copy of the file} in minimum amount of time. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] INTERFACES VS ABSTRACT
hi all, why do we separately need interfaces in java?? we can declare all the methods in abstract class as abstract this serves the purpose,then why do we have interfaces??? -- sulekha metta B.E computer science osmania university -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] O(n) solution is there or not!!
@Atul- can you explain ur approach a little more..What is A and B string wd reference to question..for each A and B string it will take O(n) time to make the table...ur approach is O(n)..dont think so..please explain may be i m wrong -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Print all possible valid set of given numer
A set will be call valid if all number can be represent as a alphabet (ie number should be less than or equal to 26) . Example : given number is 1234 then 1) {1,2,3,4} - valid ans 2){12,3,4} - Valid 3){1,23,4} -Valid 4){1,2,34} -not valid 5){123,4} - not valid 6){1234} not valid So for given number print All valid SET. -- 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/-/9GDKbM5jYp4J. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Invert bits
Write a one line code to invert the last four bits of an integer ? -- 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/-/sy3Ff971pRMJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] MS interview
Ques.. Given a m-word dictionary ... and a n-sized word... .. now suggest DS for dictionary such that you can find out all the anagrams of the given word present in dictionary... -- Regards, G C -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] MS interview
O(n) convert each string into format a1b2and then insert into multimap wityh this a1b2...as key and original word as value. All words with same key are anagrams Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Wed, Aug 22, 2012 at 11:39 PM, GAURAV CHAWLA togauravcha...@gmail.comwrote: Ques.. Given a m-word dictionary ... and a n-sized word... .. now suggest DS for dictionary such that you can find out all the anagrams of the given word present in dictionary... -- Regards, G C -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Invert bits
x ^= 15; (^ = bit wise xor) On Wed, Aug 22, 2012 at 4:16 PM, Abhi abhi120@gmail.com wrote: Write a one line code to invert the last four bits of an integer ? -- 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/-/sy3Ff971pRMJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] MS interview
@Ashish: According to your algo making multimap itself takes O(mn) time complexity (preprocessing). After then getting anagram of a string takes O(n) time. Am i right? On Thu, Aug 23, 2012 at 6:51 AM, Ashish Goel ashg...@gmail.com wrote: O(n) convert each string into format a1b2and then insert into multimap wityh this a1b2...as key and original word as value. All words with same key are anagrams Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Wed, Aug 22, 2012 at 11:39 PM, GAURAV CHAWLA togauravcha...@gmail.comwrote: Ques.. Given a m-word dictionary ... and a n-sized word... .. now suggest DS for dictionary such that you can find out all the anagrams of the given word present in dictionary... -- Regards, G C -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Print all possible valid set of given numer
divide number into digit form and save to arr[] input=1234 formed arr[]={1,2,3,4}; print elements for arr[]; now make set of 2 , 3, 4, i.e when i=2; we get *12*,3,4 1,*23*,4 1,2,*34* i=3 *123*,4 1,*234* i=4 *1234* On Wed, Aug 22, 2012 at 6:34 PM, zeroByZero shri.nit...@gmail.com wrote: A set will be call valid if all number can be represent as a alphabet (ie number should be less than or equal to 26) . Example : given number is 1234 then 1) {1,2,3,4} - valid ans 2){12,3,4} - Valid 3){1,23,4} -Valid 4){1,2,34} -not valid 5){123,4} - not valid 6){1234} not valid So for given number print All valid SET. -- 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/-/9GDKbM5jYp4J. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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.