Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
1+I.(}:=}.) 1 2 2 3 4 4 5
|
||||
2 5
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
same2=: {{
|
||||
i=. 0
|
||||
r=. ,EMPTY
|
||||
while. i < #y do.
|
||||
curr=. i{y
|
||||
if. i>0 do.
|
||||
if. curr=prev do.
|
||||
r=. r,i
|
||||
end.
|
||||
end.
|
||||
prev=. curr
|
||||
i=. i+1
|
||||
end.
|
||||
r
|
||||
}}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
same2 1,2,2,3,4,4,5
|
||||
2 5
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
same3=: {{
|
||||
i=. 0
|
||||
r=. ,EMPTY
|
||||
prev=. 99
|
||||
while. i < #y do.
|
||||
curr=. i{y
|
||||
if. i>0 do.
|
||||
if. curr=prev do.
|
||||
r=. r,i
|
||||
end.
|
||||
end.
|
||||
prev=. curr
|
||||
i=. i+1
|
||||
end.
|
||||
r
|
||||
}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue