You are viewing a single comment's thread. Return to all comments →
For c#:
List<int> FinalList=new List<int>(); for(int i=0;i<arr.Count;i++) { for(int j=i+1;j<arr.Count;j++) { if(arr[i]+arr[j]==m) { FinalList.Add(i+1); FinalList.Add(j+1); FinalList.Sort(); return FinalList; } } } FinalList.Sort(); return FinalList;
Seems like cookies are disabled on this browser, please enable them to open this website
Ice Cream Parlor
You are viewing a single comment's thread. Return to all comments →
For c#: