Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 372533c

Browse files
committedSep 21, 2024
一刷796
1 parent ca5e65e commit 372533c

File tree

5 files changed

+45
-11
lines changed

5 files changed

+45
-11
lines changed
 

‎README.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5597,14 +5597,14 @@ TIP: **公众号的微信号是: `jikerizhi`**。__因为众所周知的原因
55975597
//|{doc_base_url}/0795-number-of-subarrays-with-bounded-maximum.adoc[题解]
55985598
//|Medium
55995599
//|
5600-
//
5601-
//|{counter:codes}
5602-
//|{leetcode_base_url}/rotate-string/[796. Rotate String^]
5603-
//|{source_base_url}/_0796_RotateString.java[Java]
5604-
//|{doc_base_url}/0796-rotate-string.adoc[题解]
5605-
//|Easy
5606-
//|
5607-
//
5600+
5601+
|{counter:codes}
5602+
|{leetcode_base_url}/rotate-string/[796. Rotate String^]
5603+
|{source_base_url}/_0796_RotateString.java[Java]
5604+
|{doc_base_url}/0796-rotate-string.adoc[题解]
5605+
|Easy
5606+
|
5607+
56085608
//|{counter:codes}
56095609
//|{leetcode_base_url}/all-paths-from-source-to-target/[797. All Paths From Source to Target^]
56105610
//|{source_base_url}/_0797_AllPathsFromSourceToTarget.java[Java]

‎docs/0796-rotate-string.adoc

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,26 @@ A _shift on `A`_ consists of taking string `A` and moving the leftmost character
2323

2424
* `A` and `B` will have length at most `100`.
2525
26-
27-
26+
== 思路分析
2827

2928
[[src-0796]]
29+
====
30+
一刷::
31+
+
32+
--
3033
[{java_src_attr}]
3134
----
3235
include::{sourcedir}/_0796_RotateString.java[tag=answer]
3336
----
37+
--
38+
39+
// 二刷::
40+
// +
41+
// --
42+
// [{java_src_attr}]
43+
// ----
44+
// include::{sourcedir}/_0796_RotateString_2.java[tag=answer]
45+
// ----
46+
// --
47+
====
3448

‎docs/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,7 @@ include::0768-max-chunks-to-make-sorted-ii.adoc[leveloffset=+1]
16661666

16671667
// include::0795-number-of-subarrays-with-bounded-maximum.adoc[leveloffset=+1]
16681668

1669-
// include::0796-rotate-string.adoc[leveloffset=+1]
1669+
include::0796-rotate-string.adoc[leveloffset=+1]
16701670

16711671
// include::0797-all-paths-from-source-to-target.adoc[leveloffset=+1]
16721672

‎logbook/202406.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,12 @@
838838
|{doc_base_url}/0003-longest-substring-without-repeating-characters.adoc[题解]
839839
|✅ 滑动窗口。滑动窗口的模板不是很熟悉。可以不存字符格式,存字符最大的坐标。
840840

841+
|{counter:codes}
842+
|{leetcode_base_url}/rotate-string/[796. Rotate String^]
843+
|{doc_base_url}/0796-rotate-string.adoc[题解]
844+
|✅
845+
846+
841847
|===
842848

843849
截止目前,本轮练习一共完成 {codes} 道题。
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.diguage.algo.leetcode;
2+
3+
public class _0796_RotateString {
4+
// tag::answer[]
5+
/**
6+
* @author D瓜哥 · https://www.diguage.com
7+
* @since 2024-09-21 20:48:24
8+
*/
9+
public boolean rotateString(String s, String goal) {
10+
return (s.length() == goal.length())
11+
&& ((s + s).contains(goal));
12+
}
13+
// end::answer[]
14+
}

0 commit comments

Comments
 (0)
Please sign in to comment.