Untitled

mail@pastecode.io avatar
unknown
plain_text
25 days ago
586 B
2
Indexable
Never
  var paths = from exitToChest in pathOnStart
              join startToChest in pathOnChestToExit
              on exitToChest.Value equals startToChest.Value
              select new { exitToChest = exitToChest, startToChest = startToChest, Length = exitToChest.Length + startToChest.Length };

  var path = pathOnStart
      .Select(g => (  g,  pathOnChestToExit.Where(p => p.Value == g.Value).First() ));

  var path2 = pathOnStart
      .Join(pathOnChestToExit,
          p => p.Value,
          g => g.Value,
          (p, g) => new { p, g, l = p.Length + g.Length });
Leave a Comment