According to @NobbZ 's suggestion as well, I tried this one works:
big_list = ["9", "2", "5", "1"]
sub_out_of_order_list = ["1", "9"]
MapSet.subset?(MapSet.new(sub_out_of_order_list), MapSet.new(big_list))
Thank you everyone.
According to @NobbZ 's suggestion as well, I tried this one works:
big_list = ["9", "2", "5", "1"]
sub_out_of_order_list = ["1", "9"]
MapSet.subset?(MapSet.new(sub_out_of_order_list), MapSet.new(big_list))
Thank you everyone.