Hi , Use Hashing for That , for sum =12 & arr[]={2,4,3,6,5,8,7}; store> in to hashtable & for each index=0 in loop find sum-arr[index] so > fro sum =12 if we do index=1 a[1]=4 & sum-a[1]=8 so stop it we have > done..hope make d perfect code. > > time Complxity o(n) space size of hashtable > Let me me if anything wrong ?? > It's not clear to me. Can you please explain in simple words? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
