package
Version:
v0.0.0-...-3200de1
Opens a new window with list of versions in this module.
Published: Apr 8, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
题目
Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.
Example 1:
Input: "Let's take LeetCode contest"
Output: "s'teL ekat edoCteeL tsetnoc"
Note: In the string, each word is separated by single space and there will not be any extra space in the string.
题目大意
给定一个字符串,你需要反转字符串中每个单词的字符顺序,同时仍保留空格和单词的初始顺序。注意:在字符串中,每个单词由单个空格分隔,并且字符串中不会有任何额外的空格。
解题思路
- 反转字符串,要求按照空格隔开的小字符串为单位反转。
- 这是一道简单题。按照题意反转每个空格隔开的单词即可。
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.