Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function All_repl(unused::Array, prefix::Array, iteration::Int64, length::Int64)
- result = []
- if iteration == 1
- #print(prefix)
- return prefix
- else
- for i in unused
- x = All_repl(delete(unused, i), add(prefix, i), iteration - 1, length)
- if iteration == 2
- push!(result, x)
- else
- append!(result, x)
- end
- end
- return result
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement