vscode-leetcode icon indicating copy to clipboard operation
vscode-leetcode copied to clipboard

如何在Test中输入多个字符串参数?

Open rcocco opened this issue 5 years ago • 2 comments

使用javascript,一遇到参数是字符串的题就没法输入测试用例。 例如290 word-pattern, 我尝试过

abba\ndog cat cat fish
"abba""dog cat cat fish"
"abba"\n"dog cat cat fish"
""abba\ndog cat cat fish""

所有这些都会提示

abba is not a valid value of type string
abba is not a valid value of type string

rcocco avatar Nov 26 '20 11:11 rcocco

我在longest-palindromic-substring, 要输入 “cbbd"\n 才能识别。即要以 \n 新行结尾才行。

fxrcode avatar Jan 10 '21 07:01 fxrcode

""str1"\n"str2"",单独字符串要引号,最外围一个银行,以\n分割

Antlera avatar Apr 22 '22 08:04 Antlera