You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was suggesting to press play, but no play button so far
Suggestion:
classStringdeflongest_repetition?
max = chars
.chunk(&.itself)
.map(&.last)
.max_by?(&.size)
{max[0], max.size} if max
endendputs"aaabb".longest_repetition? # => {'a', 3}
Concurrency
Add some forced sleep to enforce the notion of concurrent events
Suggestion:
channel =Channel(Int32).new
3.times do |i|
spawndo3.times do |j|
sleep rand(100).milliseconds
channel.send 10* (i +1) + j
endendend9.times doputs channel.receive
end
The text was updated successfully, but these errors were encountered:
Syntax:
Suggestion:
Concurrency
Add some forced sleep to enforce the notion of concurrent events
Suggestion:
The text was updated successfully, but these errors were encountered: