Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 26391ac

Browse files
author
cd155
committed
add 1.9 thought
1 parent bab256a commit 26391ac

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

‎src/Array.hs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,21 @@ compreStrHelper [] holder = head holder: show (length holder)
152152
compreStrHelper (x:xs) holder
153153
| null holder = compreStrHelper xs [x]
154154
| head holder == x = compreStrHelper xs (x:holder)
155-
| otherwise = head holder: show (length holder) ++ compreStrHelper xs [x]
155+
| otherwise =
156+
head holder: show (length holder) ++ compreStrHelper xs [x]
157+
158+
{-
159+
1.9
160+
Assume you have a method isSubstring which checks if one
161+
word is a substring of another. Given two strings, sl and
162+
s2, write code to check if s2 is a rotation of sl using
163+
only one call to isSubstring (e.g.,"waterbottle" is a
164+
rotation of"erbottlewat").
165+
166+
s1 = xy = waterbottle
167+
x = wat
168+
y = erbottle
169+
s2 = xy = erbottlewat
170+
171+
what about xyxy?
172+
-}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /