Re: [algogeeks] plz help
"Hello" will be printed 45 times... On Wed, Sep 21, 2011 at 7:57 PM, sush57 wrote: > main() > { >int tmp; >for(i=0;i<9;i++) >{ >tmp=fork(); >if(tmp>0) >break; >printf("Hello"); >} > } > > > what's the output and how does this work > > can u give few other questions using fork... > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from 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] complement
+1 to Dave... On Mon, Sep 19, 2011 at 8:34 AM, sukran dhawan wrote: > 2's complement > > > On Mon, Sep 19, 2011 at 3:56 AM, Arun Vishwanathan > wrote: > >> Hi all, >> >> When I take negation of an integer in C, 0 is displayed as -1 >> ~5 is displayed as -6. >> Can some one tell me the logic of how this conversion is happening in C? >> >> Arun >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from 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] c output
0 this is fisrt a: 0 this is second a: On Sun, Sep 18, 2011 at 12:09 PM, hurtlocker wrote: > #include > > main() > > { > > int a ; > > a=abc(); > > printf("\n %d this is fisrt a:",a); > > a=abc(); > > printf("\n %d this is second a:",a); > > } > int abc() > > { > > int i=23; > > if(1>0) > > return ; > > i++; > > return(++ i); > > } > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from 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] Suggestions required regarding my final year Project....
http://www.hackchina.com/en/ On Fri, Jan 28, 2011 at 11:13 AM, pawan gangwani wrote: > Hi Rajeev/venu, > > i suggest you to think of a domain of you interest first, then proceed in > that direction thinking of some project. > have you thought of any domain in which you want to go for a project. > > it may some web application, some thing in O/S like unix, may be > implementing a protocol of networks, bulding your own shell in Unix/Linux. > > regards > Pawan > > > > On Fri, Jan 28, 2011 at 11:06 AM, Rajeev Kumar > wrote: > >> Hi, >> Can any one please suggest any good site to find good projects to do in >> final year. >> >> Thanks, >> Rajeev. >> >> On Fri, Jan 28, 2011 at 9:10 AM, Venu wrote: >> >>> Hi friends- >>> >>> This is Venu, studying final year B.Tech in Computer Science at >>> Jawaharlal Nehru University, Hyderabad. >>> Can you please suggest me some ideas regarding my final year project >>> (3 months duration). >>> >>> Thanking you in advance... >>> >>> Regards >>> Venu. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to algogeeks@googlegroups.com. >>> To unsubscribe from this group, send email to >>> algogeeks+unsubscr...@googlegroups.com >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >>> >> >> >> -- >> Thank You >> Rajeev 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. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: Amazon Interview Question
It can be done easily by counting sort On Wed, Dec 15, 2010 at 5:36 AM, Soumya Prasad Ukil wrote: > Have a look : http://geeksforgeeks.org/?p=1488 > > > On 15 December 2010 05:19, Saurabh Koar wrote: > >> @ Bittu: >> >> Lets analyze your code with iterations: >> >> the array contains 1 3 3 1 2 3 5 2 3 >> count contains 0 2 2 4 0 1 0 0 0 >> >> now 1st iteration: >> i=8,7,6 the inner loop will nt be executed; >> >> i=5; so j=0 only; as count[5]=1; >> Now arr[pos](i.e array[0])=5 >> >> i=4; the inner loop fails >> >> i=3; so j=0 to 3 as count[3]=4 >> Now array[1]=array[2]=array[3]=array[4]=3 >> >> i=2; so j=0 to 1 as count[2]=2 >> so array[5]=array[6]=2 >> >> and likewise array[7]=array[8]=1 >> >> so the final array 5 3 3 3 3 2 2 1 1 >> >> It doesnt match with the desired output. >> >> Correct me if I m missing something. >> >> >> >> On 12/15/10, bittu wrote: >> > @ankur,saurabh,soumya.. >> > >> > ya ankur i forget to remove range from dare also no need to find >> > range for this..\ >> > >> > put size-1 intead of range so that malloc will alocate the memory to >> > all elements in array ..no hope its fine... >> > >> > >> > what i did is that >> > i took counter array thta cvontains the no of times particular >> > elements comes >> > then i have sort d array in reverse order...& prints accoding to >> > count array..thats it... and the last line of actual question says.. >> > >> > """..in case of a tie print the number which occurred first ""..i >> > don't think d way i hav solved dis.. >> > >> > still please let me no..if m wrong.. >> > >> > Regards >> > Shashank Mani Narayan " Don't b evil U can earn while u Learn" >> > Computer Science & enginerring >> > BIrla Institute of Technology,Mesra >> > Cell 9166674831 >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "Algorithm Geeks" group. >> > To post to this group, send email to algoge...@googlegroups.com. >> > To unsubscribe from this group, 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 algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > > > -- > regards, > soumya prasad ukil > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, 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 algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Hard mathematical function
hi guys , Thanks for replying,can u give me some clear information on Discrete Logarithmic Problem(DLP).On 1/3/06, SUDARSHAN IYENGAR < [EMAIL PROTECTED]> wrote:well thats a theoretical result.. "Primes is in P" its not of any practical significance atleast as of today.anyone interested in cryptography here? please let me know.regards,sudarshan- Original Message -From: "Peyman" < [EMAIL PROTECTED]>To: "Algorithm Geeks"Sent: Monday, January 02, 2006 9:00 PM Subject: [algogeeks] Re: Hard mathematical function>> Hi Saravana,> Why don't you try to find Prime numbers? Recently, some indian guy,> showed that Prime is not NP anymore, but still, there's quite a lot > effort to find a new prime numbers that are huge! And it's useful in> encryption.>
[algogeeks] Re: Hard mathematical function
hi Mayur, Thanks for replying,but i want some mathematical functions like "factorization" something which deals purely with numbers.For example computing factors for very large numbers is hard but verifying whether a number is a factor of that number is very simple,i want some mathematical function of that sort,ayway thanks for relying. On 12/25/05, Mayur <[EMAIL PROTECTED]> wrote: Gene probably meant a hash function. Encryption functions may not necessarily be completely mathematical - since many of them operate on bits (components of the real information). Saravana - do a Google search on one-way functions. Also, take a look at this link http://www.wisdom.weizmann.ac.il/~oded/frag.html which has fragments from one of the most celebrated cryptography book - there's a chapter on one-way function which is available in postscript. good luck mayur On 12/24/05, Gene <[EMAIL PROTECTED] > wrote: Any encription algorithm y = E(x) takes a string x to a new string y,which is easy to compute. The inverse function x = E^-1(y) is amathematical function that is "extremely hard to compute (if theencription algorithm is any good) but very easy to verify." I.e. ifyou give me x for a given y, I'll just compute E(x) and verify thatit's equal to y.
[algogeeks] Re: Hard mathematical function
hi Gene, Thanks for replying Gene,but i want some mathematical functions like "factorization" something which deals purely with numbers,For example computing factors for very large numbers is hard but verifying whether a number is a factor of that number is very simple,i want some mathematical function of that sort,ayway thanks for relying.On 12/24/05, Gene <[EMAIL PROTECTED] > wrote:Any encription algorithm y = E(x) takes a string x to a new string y, which is easy to compute. The inverse function x = E^-1(y) is amathematical function that is "extremely hard to compute (if theencription algorithm is any good) but very easy to verify." I.e. if you give me x for a given y, I'll just compute E(x) and verify thatit's equal to y.