Skip to content

Instantly share code, notes, and snippets.

pocet_vezi = rand(8)
veze = []
pocet_vezi.times do
veze << [rand(0..7),rand(0..7)]
end
require 'set'
arr = [3,6,6,3,1,7,20,9,11,3,1,8,2,2]
# nejdriv najdu vsechny trojice v poli
triples = []
i = 0
j = 1
k = 2
while i < (arr.length-2)