You are viewing a single comment's thread. Return to all comments →
C#
public static List<int> icecreamParlor(int m, List<int> arr) { List<int> returnA = new List<int>(); for (int i = 0; i < arr.Count; i++){ for (int j = 0; j < arr.Count; j++){ if (arr[i] + arr[j] == m && i != j){ returnA = [(i + 1), (j + 1)]; returnA.Sort(); break; } } } return returnA; }
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 →
C#