You are viewing a single comment's thread. Return to all comments →
I'm not a C# programmer but I think that you can write instead:
static bool checkwords(string[] mags, string[] rans) { Array.Sort(mags); Array.Sort(rans); List<string> magList = mags.ToList(); foreach (string ransom_w in rans) { if (!magList.Remove(ransom_w)) return false; } return true; }
Rest to test!
Seems like cookies are disabled on this browser, please enable them to open this website
Hash Tables: Ransom Note
You are viewing a single comment's thread. Return to all comments →
I'm not a C# programmer but I think that you can write instead:
Rest to test!