avatar
Siz Long

My name is Siz. I am a computer science graduate student specializing in backend development with Golang and Python, seeking opportunities in innovative tech projects. My personal website is me.longsizhuo.com .Connect with me on LinkedIn: https://www.linkedin.com/in/longsizhuo/.

  • Resume
  • Archives
  • Categories
  • Photos
  • Music



{{ date }}

{{ time }}

avatar
Siz Long

My name is Siz. I am a computer science graduate student specializing in backend development with Golang and Python, seeking opportunities in innovative tech projects. My personal website is me.longsizhuo.com .Connect with me on LinkedIn: https://www.linkedin.com/in/longsizhuo/.

  • 主页
  • Resume
  • Archives
  • Categories
  • Photos
  • Music

2490Return ring sentence

  2024-01-01        
字数统计: 70字   |   阅读时长: 1min

topic:

2023-07-01.png
[2490]Return ring sentence.md

Thought:

Divide each word,Then stitch together(123Stitch123123),Determine whether the next word corresponding to each word meets whether the next word meets the same first。

Code:

1
2
3
4
5
6
7
8
9
class Solution:
def isCircularSentence(self, sentence: str) -> bool:
sentence = sentence.split(' ')
length = len(sentence)
sentence += sentence
for i in range(0, length):
if sentence[i][-1] != sentence[i+1][0]:
return False
return True
  • Python
  • answer
  • String

扫一扫,分享到微信

微信分享二维码
213.Hiccup II
2562.Find the series of the array
目录
  1. 1. topic:
  2. 2. Thought:
  3. 3. Code:

153 篇 | 133k
次 | 人
这里自动载入天数这里自动载入时分秒
2022-2025 loong loong | 新南威尔士龙龙号