Complete the code to check if the input string is empty.
if (s.[1] == 0) return true;
The correct way to check if a string is empty in C# is by checking if its Length is 0.
Complete the code to iterate over all prefixes of the string.
for (int i = 1; i <= s.[1]; i++)
In C#, the length of a string is accessed using the Length property without parentheses.
Fix the error in substring extraction to get the prefix.
string prefix = s.[1](0, i);
The correct method to get a substring in C# is Substring(startIndex, length).
Fill both blanks to check if the prefix is in the word dictionary and to recurse on the suffix.
if (wordDict.[1](prefix) && WordBreak(s.[2](i), wordDict)) return true;
Use Contains to check if the prefix is in the list, and Substring to get the suffix starting at index i.
Fill all three blanks to implement memoization using a dictionary.
if (memo.[1](s)) return memo[s]; memo.[3](s, [2]); return memo[s];
Check if the memo dictionary contains the string key using ContainsKey. Store the boolean result true or false. Use Add to insert new entries.
