From the course: C#: Applied Data Structures
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Solution: Strings
From the course: C#: Applied Data Structures
Solution: Strings
(upbeat music) - All right,. So how did you do on this one? Let's review my solution. For this challenge, we had to work with a set of strings and calculate some pieces of data about them. So we needed to figure out the number of words in the total text along with the longest word. And we needed to count the number of occurrences of each word in the entire string. So let's scroll down a little bit. To handle the first part of the challenge, we needed to get an array of strings and assemble them together as a single string in order to call the print string stats function. And for this part of the challenge, I use the string builder in order to construct a single string out of an array of strings. The string builder data structure provides a function called a pen join, which lets me specify a character that will be inserted between each of the strings and then joins them together. So the result of that function call,…