当前位置:网站首页>[programmer interview classic] 01.09 string rotation
[programmer interview classic] 01.09 string rotation
2022-07-25 01:25:00 【51CTO】
subject
String rotation . Given two strings s1 and s2, Please write code to check s2 Is it s1 It's spinning ( such as ,waterbottle yes erbottlewat Rotated string ).
Answer key
Ideas :
First, judge whether the length is consistent ;
Secondly, if it is obtained by rotation , Then there must be another string when two strings are spliced ;
Knowledge point
String splicing can be added directly ;
String.Contains(string) Returns a Boolean value , Indicates whether a string can be found in characters
Execution effect

边栏推荐
- SAP Spartacus - progressive web applications, progressive web applications
- Redis pipeline technology / partition
- ES6 modularization
- Create the first hbuilder project
- Director of Shanghai Bureau of culture and Tourism: safety is the lifeline of culture and tourism, and we are seizing the new track of yuancosmos
- How to create an index
- Listing of China graphite: the market value is nearly HK $1.2 billion, achieving a zero breakthrough in the listing of Hegang private enterprises
- Open source demo | release of open source example of arcall applet
- Summary of MATLAB basic grammar
- Six stones Management: the process is only convenient to shirk responsibility, but not helpful to solve problems
猜你喜欢

Install scoop and lux (formerly Annie)

How to implement the server anti blackmail virus system is a problem we have to consider

After burning up 130 billion yuan in ten years, vertical e-commerce will eventually enter the dust of history

7.16 - daily question - 408

Unity image control and rawimage

Rightmost × Microframe, high quality heif image coding and compression technology

Vegetable greenhouses turned into smart factories! Baidu AI Cloud helps Shouguang, Shandong build a new benchmark for smart agriculture
![[28. Maximum XOR pair]](/img/31/20498377b812116d63fa9999eeb4a8.png)
[28. Maximum XOR pair]

7.19 - daily question - 408

Data governance notes
随机推荐
Amd epyc 9654 Genoa CPU cache test exposure L1 bandwidth up to 30tb/s
Director of Shanghai Bureau of culture and Tourism: safety is the lifeline of culture and tourism, and we are seizing the new track of yuancosmos
[28. Maximum XOR pair]
"Usaco2006nov" corn fields solution
[summer daily question] Luogu p1605 maze
Pychart exits pytest mode (run pytest in mode)
Chip sold at sand price: Lei Jun's dream was "ruined" by this company
[summer daily question] output of Luogu p1157 combination
Worthington cytochrome c digestion study carboxypeptidase B scheme
Pursue and kill "wallet Assassin" all over the network
7.20 - daily question - 408
Interview questions
[summer daily question] Luogu P7550 [coci2020-2021 6] bold
The solution of displaying garbled code in SecureCRT
Specificity and five applications of Worthington alcohol dehydrogenase
How SAP Spartacus redefines login component
Screenshot of Baidu map
record
The introduction of 23 Filipino doctors for 18million was a hot topic, and the school teacher responded: expedient
Three modes of executing programs, memory and cache