You are viewing a single comment's thread. Return to all comments →
C#
public static List<int> jimOrders(List<List<int>> orders) { var res= new List<int>(); Dictionary<int,int> map = new Dictionary<int,int>(); for (int i = 0; i < orders.Count;i++) { map[i+1] = orders[i][0] + orders[i][1]; } var mapSort = map.OrderBy(x => x.Value).ToList(); foreach (var item in mapSort) { res.Add(item.Key); } return res; }
Seems like cookies are disabled on this browser, please enable them to open this website
Jim and the Orders
You are viewing a single comment's thread. Return to all comments →
C#