Discussed so many times on the group.... search in the group archive......No point repeating things again and again
On Wed, Aug 31, 2011 at 11:04 AM, bharatkumar bagana < bagana.bharatku...@gmail.com> wrote: > Its brute force method.....O(n^2) algo... > for(int i=0;i<n;i++) > for(int j=i+1;j<n;j++) > { > if(x==A[i]+A[j]) > { print A[i],A[j]; break;} > > } > > On Wed, Aug 31, 2011 at 1:15 AM, Reynald <reynaldsus...@gmail.com> wrote: > >> For example, in array, say, >> <8, 9, 2, 4, 6, 2, 3> >> >> Input 5, output 2 and 3. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > > > -- > > **Please do not print this e-mail until urgent requirement. Go Green!! > Save Papers <=> Save Trees > *BharatKumar Bagana* > **http://www.google.com/profiles/bagana.bharatkumar<http://www.google.com/profiles/bagana.bharatkumar> > * > Mobile +91 8056127652* > <bagana.bharatku...@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. > -- Saurabh Singh B.Tech (Computer Science) MNNIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.