We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
鬼知道要求是什么。
Input: "hi!" Output: "!hi" Expected: "hi!"
看到这个,以为意思是最后可能会有!,所以要考虑这种情况。
!
Input: "+---...2x+--x--+x-+-x2...---+" Output: "x-+-x+--x--+x2...---+2...---+" Expected: "+---...2x+--x--+x-+-x2...---+"
看到这个,我以为是不能用先reverse()整体,再reverse每个单词的方法了。因为符号的顺序就反了。
……
期间还有遇到数字考虑要不要分析的。
我最后才意识到,似乎就是把空格和非空格区别一下就行了。以空格进行split(),分出来的就是words,哪怕标点符号也是words。
split()
The text was updated successfully, but these errors were encountered:
我最终的cpp略复杂。
简单解法以及多种解法参见这里。
Sorry, something went wrong.
No branches or pull requests
鬼知道要求是什么。
看到这个,以为意思是最后可能会有
!
,所以要考虑这种情况。看到这个,我以为是不能用先reverse()整体,再reverse每个单词的方法了。因为符号的顺序就反了。
……
期间还有遇到数字考虑要不要分析的。
我最后才意识到,似乎就是把空格和非空格区别一下就行了。以空格进行
split()
,分出来的就是words,哪怕标点符号也是words。The text was updated successfully, but these errors were encountered: