+ 10
How the answer of this a=[1,2,3,4,5] b=[2,4,5,6]
res=a-b print res Answer= [1,3] what about 6 then
8 Respostas
+ 8
Ok it same like set functions of mathematics ..then
+ 5
Thank u so much Alexander
+ 4
a-b means all numbers that are in a, but not in b, so ans is [1,3]
+ 3
Yes
+ 1
I dont know Ruby, but maybe
+ 1
You are welcome
+ 1
bro you just remove the common element of both array and put result remaining element of an array
0
This is just like "sets" in mathematics. What elements can you find in a, but not in b. Then you print it out.