We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
List alpha = new List();
List l = new List();
List> newList = new List>();
for (int i = 97; i <= 122; i++)
{
alpha.Add((char)i);
}
var result = alpha.Zip(h, (x, y) => new Tuple(x, y))
.ToList();
foreach (var w in word)
{
l.Add(result.Where(x => x.Item1 == w).Select(x => x.Item2).FirstOrDefault());
}
return l.Count * l.Max();
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Designer PDF Viewer
You are viewing a single comment's thread. Return to all comments →
C#