[algogeeks] Help solving this problem
Given an undirected graph G = (V, E), for any subset of nodes S ⊆ V we can construct a graph Gs from G by removing all nodes in S together with their incident edges. In the critical node problem (CNP), we are given an integer 1 ≤ k ≤ |V | and need to find a subset S of size k such that the graph Gs has the minimum pair-wise connectivity. Here pairwise connectivity of a graph is defined as the number of pairs of connected vertices in the graph *Input*: The file “cnp.in” includes multiples lines. The first line contains three integers 1 ≤ n ≤ 1000, 1 ≤ m ≤ 10 and 1 ≤ k ≤ n that correspond to the number of nodes, edges, and the size of S. Each of the following m lines contain two integers u and v, separated by one space, to denote an edge from u to v. Nodes are numbered from 1 to n. *Output*: The file “cnp.out” contains exactly 2 lines. The first line contains an integer P that is the minimum pairwise connectivity of GS. The second line contains exactly k integers which are the id of the nodes in S. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.
[algogeeks] Help regarding Amazon Online Test ( OffCampus )
Hello All, I need to know about amazon online test, has anyone given that? How many and what type of questions they ask? Time period anything? Thanking you *Cheers Raghav Garg -- +91-9013201944* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] help with o/p why 0 comes???
Hi Shubham, This may be because your final data type you have chosen for your output is float, n the one which you are trying to print is of int data type (i.e. %d). Suggestion : Try changing %d to %f and see whether it works for you or not? Thanks Regards, Pratts On 01-Mar-2013, at 1:11, Shubham Sandeep s.shubhamsand...@gmail.com wrote: code snippet: int main() { printf (%d\n,(float)((int)(3.5/2))); return 0; } -- Regards, SHUBHAM SANDEEP IT 3rd yr. NIT ALD. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] help with o/p why 0 comes???
The output of the below code is also zero , key reason is floating point number are stored as *mantissa, exponent. * float dec=1.00; printf(\n dec=%d , float =%f,dec,dec); On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B kartmu...@gmail.comwrote: O/p will not be 0. 1.00 is the result which when read as %d takes the decimal value of float 1.00 stored in memory - it will not be 1.00 or 0. Since float is not stored as direct binary in memory as integer is stored, instead there's a separate procedure for storing float as binary in memory -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] help with o/p why 0 comes???
on my system every time o/p is 0 using ubuntu 10.04 ,gcc compiler On Mon, Mar 4, 2013 at 7:34 AM, rohit jangid rohit.nsi...@gmail.com wrote: output for me for the previous snippet localhost:slingshot rohitjangid$ ./a.out 1799476872 1799474584 localhost:slingshot rohitjangid$ ./a.out 1710327432 1710325144 localhost:slingshot rohitjangid$ ./a.out 1856128648 1856126360 localhost:slingshot rohitjangid$ ./a.out 1724065416 1724063128 On Mon, Mar 4, 2013 at 7:33 AM, rohit jangid rohit.nsi...@gmail.comwrote: yeah true . one interesting thing I noticed is that if you run this code #includestdio.h int main() { int i = 0; do { printf (%d\n,(float)1); }while(i++ 1); return 0; } one would expect same output in both the rows but surprisingly it came different for me every time . any clues .. why ? On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B kartmu...@gmail.comwrote: O/p will not be 0. 1.00 is the result which when read as %d takes the decimal value of float 1.00 stored in memory - it will not be 1.00 or 0. Since float is not stored as direct binary in memory as integer is stored, instead there's a separate procedure for storing float as binary in memory -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Rohit Jangid Graduate Deptt. of Computer Engineering NSIT, Delhi University, India -- Rohit Jangid Graduate Deptt. of Computer Engineering NSIT, Delhi University, India -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Regards, SHUBHAM SANDEEP IT 3rd yr. NIT ALD. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] help with o/p why 0 comes???
yup , it is showing 0 0 on ideone as well . so my gcc compiler is i686-apple-darwin11-llvm-gcc-4.2. that can be the reason . from here it appears 0 is just a coincidence and it depends on compiler implementation . C doesn't define any such behavior. On Mon, Mar 4, 2013 at 3:45 PM, Shubham Sandeep s.shubhamsand...@gmail.comwrote: on my system every time o/p is 0 using ubuntu 10.04 ,gcc compiler On Mon, Mar 4, 2013 at 7:34 AM, rohit jangid rohit.nsi...@gmail.comwrote: output for me for the previous snippet localhost:slingshot rohitjangid$ ./a.out 1799476872 1799474584 localhost:slingshot rohitjangid$ ./a.out 1710327432 1710325144 localhost:slingshot rohitjangid$ ./a.out 1856128648 1856126360 localhost:slingshot rohitjangid$ ./a.out 1724065416 1724063128 On Mon, Mar 4, 2013 at 7:33 AM, rohit jangid rohit.nsi...@gmail.comwrote: yeah true . one interesting thing I noticed is that if you run this code #includestdio.h int main() { int i = 0; do { printf (%d\n,(float)1); }while(i++ 1); return 0; } one would expect same output in both the rows but surprisingly it came different for me every time . any clues .. why ? On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B kartmu...@gmail.comwrote: O/p will not be 0. 1.00 is the result which when read as %d takes the decimal value of float 1.00 stored in memory - it will not be 1.00 or 0. Since float is not stored as direct binary in memory as integer is stored, instead there's a separate procedure for storing float as binary in memory -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Rohit Jangid Graduate Deptt. of Computer Engineering NSIT, Delhi University, India -- Rohit Jangid Graduate Deptt. of Computer Engineering NSIT, Delhi University, India -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Regards, SHUBHAM SANDEEP IT 3rd yr. NIT ALD. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Rohit Jangid Graduate Deptt. of Computer Engineering NSIT, Delhi University, India -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] help with o/p why 0 comes???
Ya, its looking like the problem of 'i686-apple-darwin11-llvm-gcc-4.2'. For me as well it shows different outputs. On Mon, Mar 4, 2013 at 4:45 PM, rohit jangid rohit.nsi...@gmail.com wrote: yup , it is showing 0 0 on ideone as well . so my gcc compiler is i686-apple-darwin11-llvm-gcc-4.2. that can be the reason . from here it appears 0 is just a coincidence and it depends on compiler implementation . C doesn't define any such behavior. On Mon, Mar 4, 2013 at 3:45 PM, Shubham Sandeep s.shubhamsand...@gmail.com wrote: on my system every time o/p is 0 using ubuntu 10.04 ,gcc compiler On Mon, Mar 4, 2013 at 7:34 AM, rohit jangid rohit.nsi...@gmail.comwrote: output for me for the previous snippet localhost:slingshot rohitjangid$ ./a.out 1799476872 1799474584 localhost:slingshot rohitjangid$ ./a.out 1710327432 1710325144 localhost:slingshot rohitjangid$ ./a.out 1856128648 1856126360 localhost:slingshot rohitjangid$ ./a.out 1724065416 1724063128 On Mon, Mar 4, 2013 at 7:33 AM, rohit jangid rohit.nsi...@gmail.comwrote: yeah true . one interesting thing I noticed is that if you run this code #includestdio.h int main() { int i = 0; do { printf (%d\n,(float)1); }while(i++ 1); return 0; } one would expect same output in both the rows but surprisingly it came different for me every time . any clues .. why ? On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B kartmu...@gmail.comwrote: O/p will not be 0. 1.00 is the result which when read as %d takes the decimal value of float 1.00 stored in memory - it will not be 1.00 or 0. Since float is not stored as direct binary in memory as integer is stored, instead there's a separate procedure for storing float as binary in memory -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Rohit Jangid Graduate Deptt. of Computer Engineering NSIT, Delhi University, India -- Rohit Jangid Graduate Deptt. of Computer Engineering NSIT, Delhi University, India -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Regards, SHUBHAM SANDEEP IT 3rd yr. NIT ALD. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Rohit Jangid Graduate Deptt. of Computer Engineering NSIT, Delhi University, India -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] help with o/p why 0 comes???
yeah true . one interesting thing I noticed is that if you run this code #includestdio.h int main() { int i = 0; do { printf (%d\n,(float)1); }while(i++ 1); return 0; } one would expect same output in both the rows but surprisingly it came different for me every time . any clues .. why ? On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B kartmu...@gmail.comwrote: O/p will not be 0. 1.00 is the result which when read as %d takes the decimal value of float 1.00 stored in memory - it will not be 1.00 or 0. Since float is not stored as direct binary in memory as integer is stored, instead there's a separate procedure for storing float as binary in memory -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Rohit Jangid Graduate Deptt. of Computer Engineering NSIT, Delhi University, India -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] help with o/p why 0 comes???
output for me for the previous snippet localhost:slingshot rohitjangid$ ./a.out 1799476872 1799474584 localhost:slingshot rohitjangid$ ./a.out 1710327432 1710325144 localhost:slingshot rohitjangid$ ./a.out 1856128648 1856126360 localhost:slingshot rohitjangid$ ./a.out 1724065416 1724063128 On Mon, Mar 4, 2013 at 7:33 AM, rohit jangid rohit.nsi...@gmail.com wrote: yeah true . one interesting thing I noticed is that if you run this code #includestdio.h int main() { int i = 0; do { printf (%d\n,(float)1); }while(i++ 1); return 0; } one would expect same output in both the rows but surprisingly it came different for me every time . any clues .. why ? On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B kartmu...@gmail.comwrote: O/p will not be 0. 1.00 is the result which when read as %d takes the decimal value of float 1.00 stored in memory - it will not be 1.00 or 0. Since float is not stored as direct binary in memory as integer is stored, instead there's a separate procedure for storing float as binary in memory -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Rohit Jangid Graduate Deptt. of Computer Engineering NSIT, Delhi University, India -- Rohit Jangid Graduate Deptt. of Computer Engineering NSIT, Delhi University, India -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[algogeeks] help with o/p why 0 comes???
code snippet: *int main() { printf (%d\n,(float)((int)(3.5/2))); return 0; }* -- Regards, SHUBHAM SANDEEP IT 3rd yr. NIT ALD. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] help with o/p why 0 comes???
I think this is because of type mismatch. You are enforcing your program to read a floating point number in the way of reading a integer. And they have totally different format. If you have -Wall turned on, you should see a warning. Yanan Cao On Thu, Feb 28, 2013 at 1:41 PM, Shubham Sandeep s.shubhamsand...@gmail.com wrote: code snippet: *int main() { printf (%d\n,(float)((int)(3.5/2))); return 0; }* -- Regards, SHUBHAM SANDEEP IT 3rd yr. NIT ALD. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] help with o/p why 0 comes???
thank you for pointing out that format was the key point. On Fri, Mar 1, 2013 at 1:19 AM, gmagog...@gmail.com gmagog...@gmail.comwrote: I think this is because of type mismatch. You are enforcing your program to read a floating point number in the way of reading a integer. And they have totally different format. If you have -Wall turned on, you should see a warning. Yanan Cao On Thu, Feb 28, 2013 at 1:41 PM, Shubham Sandeep s.shubhamsand...@gmail.com wrote: code snippet: *int main() { printf (%d\n,(float)((int)(3.5/2))); return 0; }* -- Regards, SHUBHAM SANDEEP IT 3rd yr. NIT ALD. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Regards, SHUBHAM SANDEEP IT 3rd yr. NIT ALD. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] help with o/p why 0 comes???
O/p will not be 0. 1.00 is the result which when read as %d takes the decimal value of float 1.00 stored in memory - it will not be 1.00 or 0. Since float is not stored as direct binary in memory as integer is stored, instead there's a separate procedure for storing float as binary in memory -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] help to give DP solution
www.ams.jhu.edu/~castello/362/Handouts/*hungarian*.pdf This PDF might be helpful On Sunday, 16 September 2012 16:42:25 UTC+5:30, Rahul Kumar Patle wrote: @atul: in Hungarian Algorithms works for minimization of cost where the terminating condition is based on zeros.. in my problem what value i will have to consider as base/terminating values because there may not be same values in coloumn and rows.. second thing you use subtraction there, here will i have to use addition..?? please clarify.. i have seen following link: http://s-mat-pcs.oulu.fi/~mpa/matreng/eem1_2-1.htm if you have link which explains maximization problem.. please post here.. On Sun, Sep 16, 2012 at 12:44 AM, atul anand atul.8...@gmail.comjavascript: wrote: correct me if i am wrong , it seems similar to Hungarian algorithm. here each column can be considered as persons P(p0,p1,p2,..pn) and each as cost of job say X(x0,x1,x2,x3,x4xn). Hungarian algorithm tells how to find minimal but here its maximal...so i guess changes in the algo will give the outputl On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle patlera...@gmail.comjavascript: wrote: A 2D array of order A[N][N] is given, considering entry A[i][i] as invalid you have to select one element from each row such that 1. Selected elements does not belong to same column. 2. Sum of selected element has maximal. -- Thanks and Regards: Rahul Kumar Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information Technology Indian Institute of Technology, Kharagpur-721302, Indiahttp://www.iitkgp.ac.in/ Mobile No: +91-8798049298, +91-9424738542 Alternate Email: rahulku...@hotmail.com javascript: -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algo...@googlegroups.comjavascript: . To unsubscribe from this group, send email to algogeeks+...@googlegroups.com javascript:. 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 algo...@googlegroups.comjavascript: . To unsubscribe from this group, send email to algogeeks+...@googlegroups.com javascript:. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Thanks and Regards: Rahul Kumar Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information Technology Indian Institute of Technology, Kharagpur-721302, Indiahttp://www.iitkgp.ac.in/ Mobile No: +91-8798049298, +91-9424738542 Alternate Email: rahulku...@hotmail.com javascript: -- 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/-/p2mOfKSQbrUJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to give DP solution
we can assign minimum possible value, like negative infinity to the diagonal elements. Then they would not be considered for maximizing the sum. -- 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/-/iQtl7QGJBFwJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to give DP solution
@tushar :- correct... On Sun, Sep 16, 2012 at 12:59 PM, Tushar tushicom...@gmail.com wrote: we can assign minimum possible value, like negative infinity to the diagonal elements. Then they would not be considered for maximizing the sum. -- 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/-/iQtl7QGJBFwJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to give DP solution
@atul: in Hungarian Algorithms works for minimization of cost where the terminating condition is based on zeros.. in my problem what value i will have to consider as base/terminating values because there may not be same values in coloumn and rows.. second thing you use subtraction there, here will i have to use addition..?? please clarify.. i have seen following link: http://s-mat-pcs.oulu.fi/~mpa/matreng/eem1_2-1.htm if you have link which explains maximization problem.. please post here.. On Sun, Sep 16, 2012 at 12:44 AM, atul anand atul.87fri...@gmail.comwrote: correct me if i am wrong , it seems similar to Hungarian algorithm. here each column can be considered as persons P(p0,p1,p2,..pn) and each as cost of job say X(x0,x1,x2,x3,x4xn). Hungarian algorithm tells how to find minimal but here its maximal...so i guess changes in the algo will give the outputl On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle patlerahulku...@gmail.com wrote: A 2D array of order A[N][N] is given, considering entry A[i][i] as invalid you have to select one element from each row such that 1. Selected elements does not belong to same column. 2. Sum of selected element has maximal. -- Thanks and Regards: Rahul Kumar Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information Technology Indian Institute of Technology, Kharagpur-721302, Indiahttp://www.iitkgp.ac.in/ Mobile No: +91-8798049298, +91-9424738542 Alternate Email: rahulkumarpa...@hotmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- Thanks and Regards: Rahul Kumar Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information Technology Indian Institute of Technology, Kharagpur-721302, Indiahttp://www.iitkgp.ac.in/ Mobile No: +91-8798049298, +91-9424738542 Alternate Email: rahulkumarpa...@hotmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to give DP solution
make all mat[i][j] to -ve sign and make mat[i][j]=INT_MAX now i guess same algo will work..no changes required. On Sun, Sep 16, 2012 at 4:42 PM, Rahul Kumar Patle patlerahulku...@gmail.com wrote: @atul: in Hungarian Algorithms works for minimization of cost where the terminating condition is based on zeros.. in my problem what value i will have to consider as base/terminating values because there may not be same values in coloumn and rows.. second thing you use subtraction there, here will i have to use addition..?? please clarify.. i have seen following link: http://s-mat-pcs.oulu.fi/~mpa/matreng/eem1_2-1.htm if you have link which explains maximization problem.. please post here.. On Sun, Sep 16, 2012 at 12:44 AM, atul anand atul.87fri...@gmail.comwrote: correct me if i am wrong , it seems similar to Hungarian algorithm. here each column can be considered as persons P(p0,p1,p2,..pn) and each as cost of job say X(x0,x1,x2,x3,x4xn). Hungarian algorithm tells how to find minimal but here its maximal...so i guess changes in the algo will give the outputl On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle patlerahulku...@gmail.com wrote: A 2D array of order A[N][N] is given, considering entry A[i][i] as invalid you have to select one element from each row such that 1. Selected elements does not belong to same column. 2. Sum of selected element has maximal. -- Thanks and Regards: Rahul Kumar Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information Technology Indian Institute of Technology, Kharagpur-721302, Indiahttp://www.iitkgp.ac.in/ Mobile No: +91-8798049298, +91-9424738542 Alternate Email: rahulkumarpa...@hotmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- Thanks and Regards: Rahul Kumar Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information Technology Indian Institute of Technology, Kharagpur-721302, Indiahttp://www.iitkgp.ac.in/ Mobile No: +91-8798049298, +91-9424738542 Alternate Email: rahulkumarpa...@hotmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to give DP solution
typo error :- mat[ i ] [ j ] to -ve sign and make mat[ i ][ i ]=INT_MAX On Mon, Sep 17, 2012 at 9:43 AM, atul anand atul.87fri...@gmail.com wrote: make all mat[i][j] to -ve sign and make mat[i][j]=INT_MAX now i guess same algo will work..no changes required. On Sun, Sep 16, 2012 at 4:42 PM, Rahul Kumar Patle patlerahulku...@gmail.com wrote: @atul: in Hungarian Algorithms works for minimization of cost where the terminating condition is based on zeros.. in my problem what value i will have to consider as base/terminating values because there may not be same values in coloumn and rows.. second thing you use subtraction there, here will i have to use addition..?? please clarify.. i have seen following link: http://s-mat-pcs.oulu.fi/~mpa/matreng/eem1_2-1.htm if you have link which explains maximization problem.. please post here.. On Sun, Sep 16, 2012 at 12:44 AM, atul anand atul.87fri...@gmail.comwrote: correct me if i am wrong , it seems similar to Hungarian algorithm. here each column can be considered as persons P(p0,p1,p2,..pn) and each as cost of job say X(x0,x1,x2,x3,x4xn). Hungarian algorithm tells how to find minimal but here its maximal...so i guess changes in the algo will give the outputl On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle patlerahulku...@gmail.com wrote: A 2D array of order A[N][N] is given, considering entry A[i][i] as invalid you have to select one element from each row such that 1. Selected elements does not belong to same column. 2. Sum of selected element has maximal. -- Thanks and Regards: Rahul Kumar Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information Technology Indian Institute of Technology, Kharagpur-721302, Indiahttp://www.iitkgp.ac.in/ Mobile No: +91-8798049298, +91-9424738542 Alternate Email: rahulkumarpa...@hotmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- Thanks and Regards: Rahul Kumar Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information Technology Indian Institute of Technology, Kharagpur-721302, Indiahttp://www.iitkgp.ac.in/ Mobile No: +91-8798049298, +91-9424738542 Alternate Email: rahulkumarpa...@hotmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to give DP solution
A 2D array of order A[N][N] is given, considering entry A[i][i] as invalid you have to select one element from each row such that 1. Selected elements does not belong to same column. 2. Sum of selected element has maximal. -- Thanks and Regards: Rahul Kumar Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information Technology Indian Institute of Technology, Kharagpur-721302, Indiahttp://www.iitkgp.ac.in/ Mobile No: +91-8798049298, +91-9424738542 Alternate Email: rahulkumarpa...@hotmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to give DP solution
correct me if i am wrong , it seems similar to Hungarian algorithm. here each column can be considered as persons P(p0,p1,p2,..pn) and each as cost of job say X(x0,x1,x2,x3,x4xn). Hungarian algorithm tells how to find minimal but here its maximal...so i guess changes in the algo will give the outputl On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle patlerahulku...@gmail.com wrote: A 2D array of order A[N][N] is given, considering entry A[i][i] as invalid you have to select one element from each row such that 1. Selected elements does not belong to same column. 2. Sum of selected element has maximal. -- Thanks and Regards: Rahul Kumar Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information Technology Indian Institute of Technology, Kharagpur-721302, Indiahttp://www.iitkgp.ac.in/ Mobile No: +91-8798049298, +91-9424738542 Alternate Email: rahulkumarpa...@hotmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to give DP solution
typo error :- and each *row* *as cost On Sun, Sep 16, 2012 at 12:44 AM, atul anand atul.87fri...@gmail.comwrote: correct me if i am wrong , it seems similar to Hungarian algorithm. here each column can be considered as persons P(p0,p1,p2,..pn) and each as cost of job say X(x0,x1,x2,x3,x4xn). Hungarian algorithm tells how to find minimal but here its maximal...so i guess changes in the algo will give the outputl On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle patlerahulku...@gmail.com wrote: A 2D array of order A[N][N] is given, considering entry A[i][i] as invalid you have to select one element from each row such that 1. Selected elements does not belong to same column. 2. Sum of selected element has maximal. -- Thanks and Regards: Rahul Kumar Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information Technology Indian Institute of Technology, Kharagpur-721302, Indiahttp://www.iitkgp.ac.in/ Mobile No: +91-8798049298, +91-9424738542 Alternate Email: rahulkumarpa...@hotmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to give DP solution
@atul agreed with u dat it can be solved through hungarian method.. but what about the condition a[i][i] entry is invalid if all elements lie on diagonal n d sum is also maximum den a[i][i] condition will be violated but Hungarian method still works -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 need: online Amazon Test
any one given Amzon online test recently? Plz share quetions and interview experience. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 for Indus Valley partners!
Can you please tell the kind of algos that will be asked for the interview and what all subjects to focus for? -- 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/-/vCR90sqfDDMJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 woth LISP
The next solve the problem of eight Queeen... but i don't undestand it!!! can you explain me? (defun n-queens (n m) ( if (= n 1) (loop for x from 1 to m collect (list x)) (loop for sol in (n-queens (1- n) m) nconc (loop for col from 1 to m when (loop for row from 0 to (length sol) for c in sol always (and (/= col c) (/= (abs (- c col)) (1+ row))) finally (return (cons col sol)) ) collect it ) ) ) ) -- Victor Manuel Grijalva Altamirano Universidad Tecnologica de La Mixteca -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 about compile in LISP
The next code, it's about the problem Eight Queens, i found it in internet, but i'm new in LISP and i don´t know how to compile it... Can you help me? (defun find-queen (arr p d) (destructuring-bind ((px py) (dx dy)) (list p d) (do ((x px (+ x dx)) (y py (+ y dy))) ((not (array-in-bounds-p arr x y))) (when (= (aref arr x y) 1) (return t) (defun queen-in-row (board row) (find-queen board (list row 0) '(0 1))) (defun queen-in-col (board col) (find-queen board (list 0 col) '(1 0) )) (defun queen-in-diags (board x y) (member t (mapcar (lambda (p) (find-queen board (list x y) p)) '((1 1) (-1 -1) (1 -1) (-1 1) (defun queen-in-range (board x y) (or (queen-in-row board x) (queen-in-col board y) (queen-in-diags board x y))) (defun backtracking (pred explore node) (if (funcall pred node) (list node) (mapcan (lambda (n) (backtracking pred explore n)) (funcall explore node (defun count-queens (board) (loop for i below (array-total-size board) for box = (row-major-aref board i) count ( box 0))) (defun solutionp (board) (and board (= 8 (count-queens board (defun put-queens (board) (loop for i below 8 when (not (queen-in-row board i)) return (loop for j below 8 for b = (copy-array board) when (not (queen-in-range board i j)) do (setf (aref b i j) 1) and collect b))) (defun 8-queens () (backtracking #'solutionp #'put-queens board)) (defvar board (make-array '(8 8) :initial-element 0)) -- Victor Manuel Grijalva Altamirano Universidad Tecnologica de La Mixteca -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 needed for telephonic interview from Amazon banglore.
Hi I have one year experience and have interview scheduled on monday. Pease help me with your experience or knowledge regarding questions, strategy and any misc aspect. Thanks in advance -- 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/-/wmSwLUDkhY8J. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 sourcebit !!!
Plz put the technical written paper pattern ...of sourcebit... and some sample papers...of what type of questions(level) would be asked... -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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
can anybody tell me about INFOEDGE working culture? -- Shubham bansal contact no. 7206338328 NIT Kurukshetra Computer Engineering (Final year) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help help
http://www.fileserve.com/file/eBgSThF/How%20To%20Prepare%20For%20Qt%20Apt%20For%20Cat%202E%20By%20Sharma.pdf On Tue, Sep 27, 2011 at 4:23 AM, SHUBHAM BANSAL shubham.bans...@gmail.comwrote: If anyone have E-book of Quantative Aptitude For CAT by Arun Sharma.?? Then kindly send to my email.or send me link if any 1 hav..Shubham bansal contact no. 7206338328 NIT Kurukshetra Computer Engineering (Final year) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Thanks Regards Abhishek Iyer If You Obey All the Rules, You Will Miss All the Fun. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help nedded
for 1st #includeiostream #includevector using namespace std; int main() { char c; string s; int n; vector char ans; cins; int i=0; while(s[i]!='\0') { c=s[i]; n=s[i+1]-'0'; while(n--) ans.push_back(c); i+=2; } for(i=0;ians.size();i++) coutans[i]; return 0; } On Thu, Sep 22, 2011 at 3:46 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: for 1st #includeiostream #includeconio.h #includestring.h using namespace std; int main() { char str[100]; cinstr; int len=strlen(str); int i=1; while(ilen) { int x=str[i]-48; while(x--) coutstr[i-1]; i+=2; } getch(); } On Thu, Sep 22, 2011 at 3:42 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: for 2nd one #includeiostream #includeconio.h using namespace std; int main() { char str[100]; cinstr; char ch=str[0]; int count=0,i=0; while(str[i]) { if(str[i]==ch) count++; else { coutchcount; ch=str[i]; count=1; } i++; } coutchcount; getch(); } On Thu, Sep 22, 2011 at 11:58 AM, rahul sharma rahul23111...@gmail.comwrote: i found a question of ms earlier but know i not able to find it.plz post link or thread i/p::a3b2c4: o/p:aaabb i/p:aaabbc o/p:a3b2c1 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- *Dheeraj Sharma* Comp Engg. NIT Kurukshetra -- *Dheeraj Sharma* 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. -- Regards Kunal Yadav (http://sourcebit.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.
Re: [algogeeks] help nedded
2nd #includeiostream #includevector using namespace std; int main() { string s; cins; int i=0,count=1; vectorint no; vectorchar c; while(s[i]!='\0') { if(s[i]==s[i+1]) count++; else { c.push_back(s[i]); no.push_back(count); count=1; } i++; } for(i=0;ic.size();i++) coutc[i]no[i]; return 0; } On Sat, Sep 24, 2011 at 5:53 PM, Kunal Yadav kunalyada...@gmail.com wrote: for 1st #includeiostream #includevector using namespace std; int main() { char c; string s; int n; vector char ans; cins; int i=0; while(s[i]!='\0') { c=s[i]; n=s[i+1]-'0'; while(n--) ans.push_back(c); i+=2; } for(i=0;ians.size();i++) coutans[i]; return 0; } On Thu, Sep 22, 2011 at 3:46 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: for 1st #includeiostream #includeconio.h #includestring.h using namespace std; int main() { char str[100]; cinstr; int len=strlen(str); int i=1; while(ilen) { int x=str[i]-48; while(x--) coutstr[i-1]; i+=2; } getch(); } On Thu, Sep 22, 2011 at 3:42 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: for 2nd one #includeiostream #includeconio.h using namespace std; int main() { char str[100]; cinstr; char ch=str[0]; int count=0,i=0; while(str[i]) { if(str[i]==ch) count++; else { coutchcount; ch=str[i]; count=1; } i++; } coutchcount; getch(); } On Thu, Sep 22, 2011 at 11:58 AM, rahul sharma rahul23111...@gmail.comwrote: i found a question of ms earlier but know i not able to find it.plz post link or thread i/p::a3b2c4: o/p:aaabb i/p:aaabbc o/p:a3b2c1 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- *Dheeraj Sharma* Comp Engg. NIT Kurukshetra -- *Dheeraj Sharma* 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. -- Regards Kunal Yadav (http://sourcebit.in) -- Regards Kunal Yadav (http://sourcebit.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] help nedded
i found a question of ms earlier but know i not able to find it.plz post link or thread i/p::a3b2c4: o/p:aaabb i/p:aaabbc o/p:a3b2c1 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help nedded
for 2nd one #includeiostream #includeconio.h using namespace std; int main() { char str[100]; cinstr; char ch=str[0]; int count=0,i=0; while(str[i]) { if(str[i]==ch) count++; else { coutchcount; ch=str[i]; count=1; } i++; } coutchcount; getch(); } On Thu, Sep 22, 2011 at 11:58 AM, rahul sharma rahul23111...@gmail.comwrote: i found a question of ms earlier but know i not able to find it.plz post link or thread i/p::a3b2c4: o/p:aaabb i/p:aaabbc o/p:a3b2c1 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- *Dheeraj Sharma* 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.
Re: [algogeeks] help nedded
for 1st #includeiostream #includeconio.h #includestring.h using namespace std; int main() { char str[100]; cinstr; int len=strlen(str); int i=1; while(ilen) { int x=str[i]-48; while(x--) coutstr[i-1]; i+=2; } getch(); } On Thu, Sep 22, 2011 at 3:42 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: for 2nd one #includeiostream #includeconio.h using namespace std; int main() { char str[100]; cinstr; char ch=str[0]; int count=0,i=0; while(str[i]) { if(str[i]==ch) count++; else { coutchcount; ch=str[i]; count=1; } i++; } coutchcount; getch(); } On Thu, Sep 22, 2011 at 11:58 AM, rahul sharma rahul23111...@gmail.comwrote: i found a question of ms earlier but know i not able to find it.plz post link or thread i/p::a3b2c4: o/p:aaabb i/p:aaabbc o/p:a3b2c1 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- *Dheeraj Sharma* Comp Engg. NIT Kurukshetra -- *Dheeraj Sharma* 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.
[algogeeks] Help for Pep Exam
Can anyone tell me some suggestions to prepare for Pep exam...? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
RS Agrawal is an author. Title of the book would have been more precise. On Tue, Sep 13, 2011 at 10:45 AM, sanil gandhi... sanil.gandh...@gmail.comwrote: R.S.Agrawal -- Regards, Sanil Gandhi. 9423851845. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
please suggest me some good aptitude books -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
R.S.Agrawal -- Regards, Sanil Gandhi. 9423851845. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Help ! - Explain Sscanf
sscanf is similar to scanf except that input is read from string rather than keyboard or i/o *c -supression character.it reads character and discards it.doesnt store it anywhere On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi manibharat...@gmail.comwrote: char*str=11/1/1999; sscanf(str,*c*cd,month,day,year); -- 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/-/60kR7ykKiksJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Help ! - Explain Sscanf
only year gets scanned here, * suppresses assignment of day and month. Sanju :) On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan sukrandha...@gmail.comwrote: sscanf is similar to scanf except that input is read from string rather than keyboard or i/o *c -supression character.it reads character and discards it.doesnt store it anywhere On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi manibharat...@gmail.comwrote: char*str=11/1/1999; sscanf(str,*c*cd,month,day,year); -- 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/-/60kR7ykKiksJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Help ! - Explain Sscanf
i don think so.can u brief it ? On Tue, Aug 30, 2011 at 10:45 PM, Sanjay Rajpal srn...@gmail.com wrote: only year gets scanned here, * suppresses assignment of day and month. Sanju :) On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan sukrandha...@gmail.comwrote: sscanf is similar to scanf except that input is read from string rather than keyboard or i/o *c -supression character.it reads character and discards it.doesnt store it anywhere On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi manibharat...@gmail.comwrote: char*str=11/1/1999; sscanf(str,*c*cd,month,day,year); -- 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/-/60kR7ykKiksJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Help ! - Explain Sscanf
but sanjay in the ques it is *c*cd shudn't there be a % before that ?? On Tue, Aug 30, 2011 at 11:22 PM, Sanjay Rajpal srn...@gmail.com wrote: Run the following program : main() { int a,b; scanf(%d %*d,a,b); printf(\na= %d, b=%d,a,b); } now see the values of a and b, and post the result here. Sanju :) On Tue, Aug 30, 2011 at 10:46 AM, sukran dhawan sukrandha...@gmail.comwrote: i don think so.can u brief it ? On Tue, Aug 30, 2011 at 10:45 PM, Sanjay Rajpal srn...@gmail.com wrote: only year gets scanned here, * suppresses assignment of day and month. Sanju :) On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan sukrandha...@gmail.comwrote: sscanf is similar to scanf except that input is read from string rather than keyboard or i/o *c -supression character.it reads character and discards it.doesnt store it anywhere On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi manibharat...@gmail.com wrote: char*str=11/1/1999; sscanf(str,*c*cd,month,day,year); -- 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/-/60kR7ykKiksJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Help ! - Explain Sscanf
yes conversion specifier missing i think On Tue, Aug 30, 2011 at 11:37 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote: but sanjay in the ques it is *c*cd shudn't there be a % before that ?? On Tue, Aug 30, 2011 at 11:22 PM, Sanjay Rajpal srn...@gmail.com wrote: Run the following program : main() { int a,b; scanf(%d %*d,a,b); printf(\na= %d, b=%d,a,b); } now see the values of a and b, and post the result here. Sanju :) On Tue, Aug 30, 2011 at 10:46 AM, sukran dhawan sukrandha...@gmail.comwrote: i don think so.can u brief it ? On Tue, Aug 30, 2011 at 10:45 PM, Sanjay Rajpal srn...@gmail.comwrote: only year gets scanned here, * suppresses assignment of day and month. Sanju :) On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan sukrandha...@gmail.comwrote: sscanf is similar to scanf except that input is read from string rather than keyboard or i/o *c -supression character.it reads character and discards it.doesnt store it anywhere On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi manibharat...@gmail.com wrote: char*str=11/1/1999; sscanf(str,*c*cd,month,day,year); -- 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/-/60kR7ykKiksJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Help ! - Explain Sscanf
yes % has to be there. Sanju :) On Tue, Aug 30, 2011 at 11:12 AM, sukran dhawan sukrandha...@gmail.comwrote: yes conversion specifier missing i think On Tue, Aug 30, 2011 at 11:37 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote: but sanjay in the ques it is *c*cd shudn't there be a % before that ?? On Tue, Aug 30, 2011 at 11:22 PM, Sanjay Rajpal srn...@gmail.com wrote: Run the following program : main() { int a,b; scanf(%d %*d,a,b); printf(\na= %d, b=%d,a,b); } now see the values of a and b, and post the result here. Sanju :) On Tue, Aug 30, 2011 at 10:46 AM, sukran dhawan sukrandha...@gmail.comwrote: i don think so.can u brief it ? On Tue, Aug 30, 2011 at 10:45 PM, Sanjay Rajpal srn...@gmail.comwrote: only year gets scanned here, * suppresses assignment of day and month. Sanju :) On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan sukrandha...@gmail.com wrote: sscanf is similar to scanf except that input is read from string rather than keyboard or i/o *c -supression character.it reads character and discards it.doesnt store it anywhere On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi manibharat...@gmail.com wrote: char*str=11/1/1999; sscanf(str,*c*cd,month,day,year); -- 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/-/60kR7ykKiksJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Help ! - Explain Sscanf
so what should be the correct question after writing % specifier. On Tue, Aug 30, 2011 at 11:48 PM, Sanjay Rajpal srn...@gmail.com wrote: yes % has to be there. Sanju :) On Tue, Aug 30, 2011 at 11:12 AM, sukran dhawan sukrandha...@gmail.comwrote: yes conversion specifier missing i think On Tue, Aug 30, 2011 at 11:37 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote: but sanjay in the ques it is *c*cd shudn't there be a % before that ?? On Tue, Aug 30, 2011 at 11:22 PM, Sanjay Rajpal srn...@gmail.comwrote: Run the following program : main() { int a,b; scanf(%d %*d,a,b); printf(\na= %d, b=%d,a,b); } now see the values of a and b, and post the result here. Sanju :) On Tue, Aug 30, 2011 at 10:46 AM, sukran dhawan sukrandha...@gmail.com wrote: i don think so.can u brief it ? On Tue, Aug 30, 2011 at 10:45 PM, Sanjay Rajpal srn...@gmail.comwrote: only year gets scanned here, * suppresses assignment of day and month. Sanju :) On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan sukrandha...@gmail.com wrote: sscanf is similar to scanf except that input is read from string rather than keyboard or i/o *c -supression character.it reads character and discards it.doesnt store it anywhere On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi manibharat...@gmail.com wrote: char*str=11/1/1999; sscanf(str,*c*cd,month,day,year); -- 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/-/60kR7ykKiksJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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!!
Hi folks ! I am able to clear the aptitude round of placement but i will not be called for the second interview round in the first interview round they will not ask much questions and what ever they wil ask i will answer dem correctly only . This has happened with me twice!! i am seriously depressed what to do ??? i am not able to find out my weakness also :( Plz some interview cracking material Looking forward for your help! Jestin Nair -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 on this
h can ny suggest me some link for 1. compiler contruction 2. Web OS construction nd suggest some good final year projects... -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help on this
Yogesh. Web OS is dead. Leave it and Move on... Compiler construction is a cool thing to learn though. For final year project, first find a good organization where you can do a project. use your contacts. then find out what kind of projects are available in that organization/IT company. -sarvesh On Mon, Aug 22, 2011 at 1:07 AM, Yogesh Bhati ybha...@gmail.com wrote: h can ny suggest me some link for 1. compiler contruction 2. Web OS construction nd suggest some good final year projects... -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help on this
we have to do final year project in colg itself. intership project is another thing. I hv done that. so ,any links frm where i can get detail for compiler contruction or web crawler plz suggest -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
just search the groupyou'll find lots of questions -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad http://gplus.to/amolsharma99 http://twitter.com/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://youtube.com/amolsharma99 On Sat, Aug 20, 2011 at 12:14 PM, mani walia manis...@gmail.com wrote: P TELL ME ABOUT HOW TO PREPARE -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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!!!!!
I m a CSE student Plz suggest me sum final yr project 1. good project that help me learn or 2.that solve sum real lyf situation means projects that are needed to make thngs easy for others do post ur 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.
Re: [algogeeks] help!!!!!
On 20 August 2011 21:09, Yogesh Bhati ybha...@gmail.com wrote: I m a CSE student Plz suggest me sum final yr project 1. good project that help me learn or 2.that solve sum real lyf situation means projects that are needed to make thngs easy for others do post ur suggestion what is your area of interest ? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 Siddharth Srivastava -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help!!!!!
area of interest : 1.web related koi application 2.database 3.core programming -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help!!!!!
how about a webOS ? (it involves all 3 ;-) ) On 20 August 2011 21:22, Yogesh Bhati ybha...@gmail.com wrote: area of interest : 1.web related koi application 2.database 3.core programming -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 Siddharth Srivastava -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help!!!!!
4.ERP also webos wat is it?? brief is it related to *webOS* is a proprietaryhttp://en.wikipedia.org/wiki/Proprietary_software mobile operating systemhttp://en.wikipedia.org/wiki/Mobile_operating_system running on the Linux kernel http://en.wikipedia.org/wiki/Linux_kernel. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help!!!!!
On 20 August 2011 21:33, Yogesh Bhati ybha...@gmail.com wrote: 4.ERP also webos wat is it?? brief is it related to *webOS* is a proprietaryhttp://en.wikipedia.org/wiki/Proprietary_software mobile operating systemhttp://en.wikipedia.org/wiki/Mobile_operating_system running on the Linux kernel http://en.wikipedia.org/wiki/Linux_kernel. Sorry for confusion. I meant a web based operating system. (related to cloud computing or ubiquitous computing) Contributing to an existing OS or kernel project wouldn't be bad either (specifically for your Core Programming interest :) ) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 Siddharth Srivastava -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help!!!!!
thanx dude -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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--code
which code executes faster? code1:- for(i=0;in;i++) for(j=0;jn;j++) large_array[i][j]=0; code2:- for(j=0;jn;j++) for(i=0;in;i++) large_array[i][j]=0; -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help--code
If the dimensions are same, both will execute equally fast. On Mon, Aug 8, 2011 at 3:21 PM, Kamakshii Aggarwal kamakshi...@gmail.com wrote: which code executes faster? code1:- for(i=0;in;i++) for(j=0;jn;j++) large_array[i][j]=0; code2:- for(j=0;jn;j++) for(i=0;in;i++) large_array[i][j]=0; -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Gaurav Menghani -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help--code
Sorry, I was thinking something else. Code 1 should be faster since arrays are stored in row-major fashion, the entire row will fit in cache, and accessing sequentially in the row would be faster because of higher cache hits than Code 2. On Mon, Aug 8, 2011 at 3:25 PM, Gaurav Menghani gaurav.mengh...@gmail.com wrote: If the dimensions are same, both will execute equally fast. On Mon, Aug 8, 2011 at 3:21 PM, Kamakshii Aggarwal kamakshi...@gmail.com wrote: which code executes faster? code1:- for(i=0;in;i++) for(j=0;jn;j++) large_array[i][j]=0; code2:- for(j=0;jn;j++) for(i=0;in;i++) large_array[i][j]=0; -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Gaurav Menghani -- Gaurav Menghani -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help--code
got it..thanks :) On Mon, Aug 8, 2011 at 3:27 PM, Gaurav Menghani gaurav.mengh...@gmail.comwrote: Sorry, I was thinking something else. Code 1 should be faster since arrays are stored in row-major fashion, the entire row will fit in cache, and accessing sequentially in the row would be faster because of higher cache hits than Code 2. On Mon, Aug 8, 2011 at 3:25 PM, Gaurav Menghani gaurav.mengh...@gmail.com wrote: If the dimensions are same, both will execute equally fast. On Mon, Aug 8, 2011 at 3:21 PM, Kamakshii Aggarwal kamakshi...@gmail.com wrote: which code executes faster? code1:- for(i=0;in;i++) for(j=0;jn;j++) large_array[i][j]=0; code2:- for(j=0;jn;j++) for(i=0;in;i++) large_array[i][j]=0; -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Gaurav Menghani -- Gaurav Menghani -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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, Kamakshi kamakshi...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help--code
Both Will take same time. -- 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/-/hwcTUmMW_zsJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help--code
@gaurav: are u sure? On Mon, Aug 8, 2011 at 3:40 PM, Amir pkpat...@gmail.com wrote: Both Will take same time. -- 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/-/hwcTUmMW_zsJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help--code
The principle of locality of reference suggests if a reference is made to a memory location, next reference is close to it. So, it is a basic assumption that processors fetch memory locations close to it, to optimize fetch time. Since the array is stored in row-major form AFAIK, elements in the same row are closer to each other and more likely to be in cache together, as compared to elements in different rows. On Mon, Aug 8, 2011 at 5:12 PM, Prakash D cegprak...@gmail.com wrote: @gaurav: are u sure? On Mon, Aug 8, 2011 at 3:40 PM, Amir pkpat...@gmail.com wrote: Both Will take same time. -- 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/-/hwcTUmMW_zsJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- Gaurav Menghani -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help--code
nice explanation gaurav Thank you, Siddharam On Mon, Aug 8, 2011 at 5:17 PM, Gaurav Menghani gaurav.mengh...@gmail.comwrote: The principle of locality of reference suggests if a reference is made to a memory location, next reference is close to it. So, it is a basic assumption that processors fetch memory locations close to it, to optimize fetch time. Since the array is stored in row-major form AFAIK, elements in the same row are closer to each other and more likely to be in cache together, as compared to elements in different rows. On Mon, Aug 8, 2011 at 5:12 PM, Prakash D cegprak...@gmail.com wrote: @gaurav: are u sure? On Mon, Aug 8, 2011 at 3:40 PM, Amir pkpat...@gmail.com wrote: Both Will take same time. -- 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/-/hwcTUmMW_zsJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- Gaurav Menghani -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help on string manipulation bit manipulation
i have seen plenty of questions on string manipulation and bits operations asked in various comcanies exams. any one give me some good links where i can find some really good tutorials on string manipulation. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 for Thoughworks
Hi folks! If any of you have Thoughworks flow questions, Coding rounds questions, Technical interview questions kindly please share. Thank you. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Help for Thoughworks
Sorry for the typo, Its Thoughtworks On Wed, Aug 3, 2011 at 11:04 PM, Reynald reynaldsus...@gmail.com wrote: Hi folks! If any of you have Thoughworks flow questions, Coding rounds questions, Technical interview questions kindly please share. Thank you. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 Reynald Reni Masters in Software Engineering CIT - 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] Help for Thoughworks
hi reynald i have send u some questions on the group On Wed, Aug 3, 2011 at 10:36 AM, Reynald Suz reynaldsus...@gmail.comwrote: Sorry for the typo, Its Thoughtworks On Wed, Aug 3, 2011 at 11:04 PM, Reynald reynaldsus...@gmail.com wrote: Hi folks! If any of you have Thoughworks flow questions, Coding rounds questions, Technical interview questions kindly please share. Thank you. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 Reynald Reni Masters in Software Engineering CIT - 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] Help on Recursion Bit Operators related problems
the best way to identify recursion is when finding solution to a problem consist of finding solution to a sub problem ex-5!=5*(4!)=5*4*(3!). for bits see topcoder tutorials on bitwise operators -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Help on Recursion Bit Operators related problems
thanks raj, is this the bitwise operator tutorial that you told about ? http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=bitManipulation On Wed, Aug 3, 2011 at 3:48 PM, raj kumar megamonste...@gmail.com wrote: the best way to identify recursion is when finding solution to a problem consist of finding solution to a sub problem ex-5!=5*(4!)=5*4*(3!). for bits see topcoder tutorials on bitwise operators -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help with stringstream (STL)
Hi, i don't know how to use stringstream of STL, if i have the string a=helloawordagoodabye, i need the next list: hello word good bye check that for each 'a' i need break the string...how -- Victor Manuel Grijalva Altamirano Universidad Tecnologica de La Mixteca -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help with stringstream (STL)
http://ideone.com/FtfQO On Thu, Aug 4, 2011 at 2:54 AM, Victor Manuel Grijalva Altamirano kavic1.mar...@gmail.com wrote: Hi, i don't know how to use stringstream of STL, if i have the string a=helloawordagoodabye, i need the next list: hello word good bye check that for each 'a' i need break the string...how -- Victor Manuel Grijalva Altamirano Universidad Tecnologica de La Mixteca -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help with stringstream (STL)
thanks Pankaj, i learn some new today -- Victor Manuel Grijalva Altamirano Universidad Tecnologica de La Mixteca -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help with stringstream (STL)
nice code :) On Thu, Aug 4, 2011 at 3:10 AM, Victor Manuel Grijalva Altamirano kavic1.mar...@gmail.com wrote: thanks Pankaj, i learn some new today -- Victor Manuel Grijalva Altamirano Universidad Tecnologica de La Mixteca -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Anuj Kumar Third Year Undergraduate, Dept. of Computer Science and Engineering NIT Durgapur -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Help on Recursion Bit Operators related problems
even this is a gud 1. http://www.cprogramming.com/tutorial/bitwise_operators.html Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Thu, Aug 4, 2011 at 1:35 AM, Samba Ganapavarapu sambasiv...@gmail.comwrote: thanks raj, is this the bitwise operator tutorial that you told about ? http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=bitManipulation On Wed, Aug 3, 2011 at 3:48 PM, raj kumar megamonste...@gmail.com wrote: the best way to identify recursion is when finding solution to a problem consist of finding solution to a sub problem ex-5!=5*(4!)=5*4*(3!). for bits see topcoder tutorials on bitwise operators -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] help to code
Write a program that accepts an input integer n, and calculates the number and sum of all the numbers between 1 and n (inclusive) that are NOT evenly divisible by ANY of the first 5 prime numbers (2,3,5,7,11). The program should print out a clearly labeled count and sum my code is : it is not giving correct result #include iostream #includeconio.h using namespace std; int main() { int userInteger = 0; cout Enter A Number endl; cin userInteger; // Ask For a number from the user if (userInteger 0) // Is the number valid? { int result = 0; int prime[5] = { 2, 3, 5, 7, 11 }; int a = 1, count = 0; while (a userInteger) // Looping to user's input { int b = 0; while (b 5) // Looping the prime numbers array { if (a % prime[b]) { result += a; // If Not evenly divisible by prime number at index 'b' count++; } b++; } a++; // Increment the counter } cout Numbers Not evenly divisible by 5 prime numbers: count endl; cout The Sum of numbers not evenly divisible by 5 prime numbers: result endl; } getch(); return 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.
[algogeeks] Help!!
This is the solution to the MST problem m getting WA again n again... cant figure out where's the mistake... so plzzz help!!! https://www.spoj.pl/problems/BLINNET/ #includeiostream #includestring #includevector #includelist #includequeue #define MAXINT (int)9e9 #define TR(a,it)for(typeof((a).begin()) it=(a).begin(); it! =(a).end(); ++it) using namespace std; struct node { long int data; string name; long int cost; long int distance; long int parent; friend bool operator(const node a, const node b); }; long int prims(vector listnode adjlist, int n); int main() { freopen(input.txt, r, stdin); freopen(output.txt, w, stdout); long int n, t, no_neigh; cin t; while(t--) { vector listnode adjlist; node temp; getchar(); cin n; adjlist.resize(n + 1); for(int i=1; i=n; i++) { cin temp.name; //temp.data = i; //adjlist[i].push_back(temp); cin no_neigh; for(int j=1; j=no_neigh; j++) { cin temp.data temp.cost; adjlist[i].push_back(temp); } } /*for(int i=1; i=n; i++) { cout i : endl; TR(adjlist[i], it) cout it-data it-cost endl; }*/ cout prims(adjlist, n) endl; } } bool operator(const node a, const node b) { return a.distance b.distance; } long int prims(vector listnode adjlist, int n) { priority_queuenode, vectornode, greaternode pq; node heap[n+1]; for(long int i=1; i=n; i++) { heap[i].data = i; heap[i].distance = MAXINT; heap[i].parent = -1; } long int start = 1; heap[start].distance = 0; pq.push(heap[start]); while(!pq.empty()) { node top = pq.top(); pq.pop(); //cout popped : top.data endl; if(top.distance = heap[top.data].distance) { //cout Traversed endl; TR(adjlist[top.data], it) { if(heap[it-data].distance it-cost) { heap[it-data].distance = it-cost; heap[it-data].parent = top.data; //cout Pushed it-data endl; pq.push(heap[it-data]); } } } } long int sum = 0; for(int i=1; i=n; i++) sum += heap[i].distance; return sum; } -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to code
Clarification : The number (count) is the number of elements between 1 and n which are not evenly divisible by 5 prime numbers and the result is the sum of all the numbers between 1 and n which are not evenly divisible by 5 prime numbers . Right??? For Example : if n=5 then count -2 (i.e 1 and 3 ) and result = 5 If I am wrong ,Please Correct me and give me the outputs expected Thank You Rajeev N B On Tue, Jul 5, 2011 at 12:17 PM, shiv narayan narayan.shiv...@gmail.comwrote: Write a program that accepts an input integer n, and calculates the number and sum of all the numbers between 1 and n (inclusive) that are NOT evenly divisible by ANY of the first 5 prime numbers (2,3,5,7,11). The program should print out a clearly labeled count and sum my code is : it is not giving correct result #include iostream #includeconio.h using namespace std; int main() { int userInteger = 0; cout Enter A Number endl; cin userInteger; // Ask For a number from the user if (userInteger 0) // Is the number valid? { int result = 0; int prime[5] = { 2, 3, 5, 7, 11 }; int a = 1, count = 0; while (a userInteger) // Looping to user's input { int b = 0; while (b 5) // Looping the prime numbers array { if (a % prime[b]) { result += a; // If Not evenly divisible by prime number at index 'b' count++; } b++; } a++; // Increment the counter } cout Numbers Not evenly divisible by 5 prime numbers: count endl; cout The Sum of numbers not evenly divisible by 5 prime numbers: result endl; } getch(); return 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] help to code
val = 2*3*5*7*11 for(i = 0 to n-1) if(val%a[i] == 0) count++,sum+=a[i]; surender On Tue, Jul 5, 2011 at 10:10 PM, Rajeev Bharshetty rajeev.open.1...@gmail.com wrote: Clarification : The number (count) is the number of elements between 1 and n which are not evenly divisible by 5 prime numbers and the result is the sum of all the numbers between 1 and n which are not evenly divisible by 5 prime numbers . Right??? For Example : if n=5 then count -2 (i.e 1 and 3 ) and result = 5 If I am wrong ,Please Correct me and give me the outputs expected Thank You Rajeev N B On Tue, Jul 5, 2011 at 12:17 PM, shiv narayan narayan.shiv...@gmail.comwrote: Write a program that accepts an input integer n, and calculates the number and sum of all the numbers between 1 and n (inclusive) that are NOT evenly divisible by ANY of the first 5 prime numbers (2,3,5,7,11). The program should print out a clearly labeled count and sum my code is : it is not giving correct result #include iostream #includeconio.h using namespace std; int main() { int userInteger = 0; cout Enter A Number endl; cin userInteger; // Ask For a number from the user if (userInteger 0) // Is the number valid? { int result = 0; int prime[5] = { 2, 3, 5, 7, 11 }; int a = 1, count = 0; while (a userInteger) // Looping to user's input { int b = 0; while (b 5) // Looping the prime numbers array { if (a % prime[b]) { result += a; // If Not evenly divisible by prime number at index 'b' count++; } b++; } a++; // Increment the counter } cout Numbers Not evenly divisible by 5 prime numbers: count endl; cout The Sum of numbers not evenly divisible by 5 prime numbers: result endl; } getch(); return 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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to code
I think you are getting it wrong. Surender, your solution says that numbers divisible by all of the first 5 prime numbers will be taken into account whereas the question says that only the numbers *not* evenly divisible by *any* of the first 5 prime numbers are to be added. Shiv, you are making two mistakes: 1. you say n is also included but your code excludes it. 2. you are just checking if a number is not divisible by one of the 5 prime numbers. If it is not divisible by any one number, you add it to your result, whereas your language of the question suggests that it should be that numbers which are not divisible by any of the five numbers, i.e., not divisible by all the 5 numbers ( not the ones divisible by just ant one of the 5). Hope I am correct in my interpretation. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help to code
If my interpretation is right, following should be the code. int main() { int userInteger = 0; cout Enter A Number endl; cin userInteger; // Ask For a number from the user if (userInteger 0) // Is the number valid? { int result = 0; int prime[5] = { 2, 3, 5, 7, 11 }; int a,b, count = 0; *for(a=1;a=userInteger;++a) // Looping to user's input { for(b=0;b 5;++b) // Looping the prime numbers array { if (a % prime[b] == 0) //if divisible by any number, just end it there break; } //break or end of loop will bring the control here if(b==5) //a was not divisible by any of the first 5 prime numbers { result+=a; ++count; } }* cout Numbers Not evenly divisible by 5 prime numbers: count endl; cout The Sum of numbers not evenly divisible by 5 prime numbers: result endl; } getch(); return 0; } As per my solution, Test Cases: 1) userInteger = 20 count = 4 Numbers will be: 1, 13, 17, 19 result = 50 2) userInteger = 35 count = 7 Numbers will be: 1, 13, 17, 19, 23, 29, 31 result = 133 Even numbers can never be there in this list as they are all divisible by 2. Bfore 169, only prime numbers can be included. Hope my interpretation of your question was correct -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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..
the length of the rope is l units. I can only cut any rope into two halves. for example if the length of the rope is 8 and we need a length of rope 6 we first cut into two halves and we get 4, 4 now we cut any of the half again and we get 4,2,2 now we can merge 4 and 2 and form a rope of length 6. in this example we need a minimum of 2 cuts to get the length of rope 6 from 8 assume that l is always a power of 2 and we need always a even length of rope from it how to find the number of minimum cuts needed to get the new rope?. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help..
i guess the no. of 1s in the binary representation of the number is the answer..for 6 its 2... On Sat, Jul 2, 2011 at 1:32 PM, cegprakash cegprak...@gmail.com wrote: the length of the rope is l units. I can only cut any rope into two halves. for example if the length of the rope is 8 and we need a length of rope 6 we first cut into two halves and we get 4, 4 now we cut any of the half again and we get 4,2,2 now we can merge 4 and 2 and form a rope of length 6. in this example we need a minimum of 2 cuts to get the length of rope 6 from 8 assume that l is always a power of 2 and we need always a even length of rope from it how to find the number of minimum cuts needed to get the new rope?. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help..
yup :) On Sat, Jul 2, 2011 at 1:38 PM, Shalini Sah shalinisah.luv4cod...@gmail.com wrote: i guess the no. of 1s in the binary representation of the number is the answer..for 6 its 2... On Sat, Jul 2, 2011 at 1:32 PM, cegprakash cegprak...@gmail.com wrote: the length of the rope is l units. I can only cut any rope into two halves. for example if the length of the rope is 8 and we need a length of rope 6 we first cut into two halves and we get 4, 4 now we cut any of the half again and we get 4,2,2 now we can merge 4 and 2 and form a rope of length 6. in this example we need a minimum of 2 cuts to get the length of rope 6 from 8 assume that l is always a power of 2 and we need always a even length of rope from it how to find the number of minimum cuts needed to get the new rope?. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
(this is dependon on compiler implementaion)this is due to shortcircuit implementaion of intermidiate code genaration phase of compiler.. please read Aho ullman book of compiler desgn to get more details. On Wed, Jun 15, 2011 at 12:51 AM, snehi jain snehijai...@gmail.com wrote: first it checks Q if that is NOT true then it computes R else it doesn't. this is the correct line . On Tue, Jun 14, 2011 at 10:21 PM, snehi jain snehijai...@gmail.comwrote: that is what is happening here m = ++i || (++j ++k); in C if P = Q || R; first it checks Q if that is NOT true then it computes C else it doesn't. ++ is a unary operator so before the || and operations can happen increment will take place. This justifies the higher precedence of ++ operator. in the above example i gets incremented to -2 first and then || operation is executed. i has a non-zero value therefore no computation is done for (++j ++k); . keep initial value of i to -1 then after m = ++i || (++j ++k); statement i = 0 , j = 3 , k =1 and m =1 On Tue, Jun 14, 2011 at 10:02 PM, nicks crazy.logic.k...@gmail.comwrote: hmm...someone explain...me too confused :( On Tue, Jun 14, 2011 at 9:14 AM, rahul dixit dixit.rahu...@gmail.comwrote: bt increment operator has the higher precedence than || and so all the variables should be incremented first then and then || should be evaluated then how it is happening.plz explain rahul dixit Du-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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- Thanks and Regards, -- *DIPANKAR DUTTA* Visiting Research Scholar Dept of Computing, Macquarie University, Sydney, Australia ph.no-+61 2 98509079 ( Mon-Fri 10:15-7:00) Sydney time email: dipankar.du...@mq.edu.au -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 me wd the following problem
Hello friends I am thinking of a combinatorics solution to this problem on spoj but cant come up wd a formula please suggest me some technique to solve this problem http://www.spoj.pl/problems/CHAIR/ -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
What about precedence order then. http://www.difranco.net/cop2220/op-prec.htm i mean acc. to precedence order should be evaluated before || in the second exampleresult should be k=1,j=3 and i= -2 On Mon, Jun 13, 2011 at 11:41 AM, udit sharma sharmaudit...@gmail.comwrote: hmm. Sry yr... Got it.. Thanx.. :) :) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
anybody having idea about preference order ?? On Tue, Jun 14, 2011 at 4:20 AM, nicks crazy.logic.k...@gmail.com wrote: What about precedence order then. http://www.difranco.net/cop2220/op-prec.htm i mean acc. to precedence order should be evaluated before || in the second exampleresult should be k=1,j=3 and i= -2 On Mon, Jun 13, 2011 at 11:41 AM, udit sharma sharmaudit...@gmail.comwrote: hmm. Sry yr... Got it.. Thanx.. :) :) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
according to precedence m= ++i || ++j ++k will become m = ++i || (++j ++k);NOT this m = (++i || ++j) ++k; first i gets incremented and since that gives a non-zero value the rest of the statement is not executed. On Tue, Jun 14, 2011 at 8:41 PM, nicks crazy.logic.k...@gmail.com wrote: anybody having idea about preference order ?? On Tue, Jun 14, 2011 at 4:20 AM, nicks crazy.logic.k...@gmail.com wrote: What about precedence order then. http://www.difranco.net/cop2220/op-prec.htm i mean acc. to precedence order should be evaluated before || in the second exampleresult should be k=1,j=3 and i= -2 On Mon, Jun 13, 2011 at 11:41 AM, udit sharma sharmaudit...@gmail.comwrote: hmm. Sry yr... Got it.. Thanx.. :) :) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
bt increment operator has the higher precedence than || and so all the variables should be incremented first then and then || should be evaluated then how it is happening.plz explain rahul dixit Du-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.
Re: [algogeeks] help
hmm...someone explain...me too confused :( On Tue, Jun 14, 2011 at 9:14 AM, rahul dixit dixit.rahu...@gmail.comwrote: bt increment operator has the higher precedence than || and so all the variables should be incremented first then and then || should be evaluated then how it is happening.plz explain rahul dixit Du-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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
that is what is happening here m = ++i || (++j ++k); in C if P = Q || R; first it checks Q if that is NOT true then it computes C else it doesn't. ++ is a unary operator so before the || and operations can happen increment will take place. This justifies the higher precedence of ++ operator. in the above example i gets incremented to -2 first and then || operation is executed. i has a non-zero value therefore no computation is done for (++j ++k); . keep initial value of i to -1 then after m = ++i || (++j ++k); statement i = 0 , j = 3 , k =1 and m =1 On Tue, Jun 14, 2011 at 10:02 PM, nicks crazy.logic.k...@gmail.com wrote: hmm...someone explain...me too confused :( On Tue, Jun 14, 2011 at 9:14 AM, rahul dixit dixit.rahu...@gmail.comwrote: bt increment operator has the higher precedence than || and so all the variables should be incremented first then and then || should be evaluated then how it is happening.plz explain rahul dixit Du-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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
first it checks Q if that is NOT true then it computes R else it doesn't. this is the correct line . On Tue, Jun 14, 2011 at 10:21 PM, snehi jain snehijai...@gmail.com wrote: that is what is happening here m = ++i || (++j ++k); in C if P = Q || R; first it checks Q if that is NOT true then it computes C else it doesn't. ++ is a unary operator so before the || and operations can happen increment will take place. This justifies the higher precedence of ++ operator. in the above example i gets incremented to -2 first and then || operation is executed. i has a non-zero value therefore no computation is done for (++j ++k); . keep initial value of i to -1 then after m = ++i || (++j ++k); statement i = 0 , j = 3 , k =1 and m =1 On Tue, Jun 14, 2011 at 10:02 PM, nicks crazy.logic.k...@gmail.comwrote: hmm...someone explain...me too confused :( On Tue, Jun 14, 2011 at 9:14 AM, rahul dixit dixit.rahu...@gmail.comwrote: bt increment operator has the higher precedence than || and so all the variables should be incremented first then and then || should be evaluated then how it is happening.plz explain rahul dixit Du-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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] help
can sme body tell me..? 1) #include stdio.h int main() { int i= -3, j=2 ,k=0, m; m= ++i ++j || ++k; printf(%d %d %d %d\n,i,j,k,m); return 0; } output: -2 3 0 1 2)#include stdio.h int main() { int i= -3, j=2 ,k=0, m; m= ++i || ++j ++k; printf(%d %d %d %d\n,i,j,k,m); return 0; } output: -2 2 0 1 3) #include stdio.h int main() { int i= -3, j=2 ,k=0, m; m= ++i ++j ++k; printf(%d %d %d %d\n,i,j,k,m); return 0; } output: -2 3 1 1 how came this output.??? in the first code why..k is not incremented.?? and hw the value of m came out to be 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] help
the expression involving and and or operator is evaluated from left to right uptill the point from where the value of the expression can be determined. On Mon, Jun 13, 2011 at 6:17 PM, Shachindra A C sachindr...@gmail.comwrote: || and operators are called short circuit operators and need not necessarily evaluate the entire expression. In ex 1, m= ++i ++j || ++k; here, ++i and ++j are done. then the result is orred with ++k; here, irrespective of the value of the right side(++k), the result would always be 1. Hence, the results. On Mon, Jun 13, 2011 at 6:12 PM, sahil sahil18...@gmail.com wrote: can sme body tell me..? 1) #include stdio.h int main() { int i= -3, j=2 ,k=0, m; m= ++i ++j || ++k; printf(%d %d %d %d\n,i,j,k,m); return 0; } output: -2 3 0 1 2)#include stdio.h int main() { int i= -3, j=2 ,k=0, m; m= ++i || ++j ++k; printf(%d %d %d %d\n,i,j,k,m); return 0; } output: -2 2 0 1 3) #include stdio.h int main() { int i= -3, j=2 ,k=0, m; m= ++i ++j ++k; printf(%d %d %d %d\n,i,j,k,m); return 0; } output: -2 3 1 1 how came this output.??? in the first code why..k is not incremented.?? and hw the value of m came out to be 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. -- Regards, Shachindra A 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] help
ok i got the values of i ,j ,k ,.in all the 3 codes but can u please explain me how we get the value of m =1 in all the 3 program.? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.