bool IsSmooth(string input){ var inputWords = input.Split(); bool allCharsMatch = true; for (int i = 1; i < inputWords.Length; i++) { if (inputWords[i][0] != inputWords[i - 1].Last()) { allCharsMatch = false; break; } } return allCharsMatch;}
bool IsSmooth(string input){ var inputWords = input.Split(); bool allCharsMatch = true; for (int i = 1; i < inputWords.Length; i++) { if (inputWords[i][0] != inputWords[i - 1].Last()) { allCharsMatch = false; break; } } return allCharsMatch;}
How can I get the same functionality with LINQ, I tried looking it up but its usage of lambda functions confused me. Should I stick with this type of loops instead of LINQ and where can I learn LINQ, Microsoft's LINQ documentation is too complex for me. If I need to spend more time before I get into LINQ what should I accomplish / know?