MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: faster sublist checking


Why is this?

A = {3, 5}; B = {1, 2, 3, 4, 5, 6, 7};

Intersection[B, A] == Sort[A]
True

but

SublistQ[B_List, A_List] := Intersection[B, A] == Sort[A];

SublistQ[B, A]
False

Al Myers


  • Prev by Date: Re: Writing/appending tables to CSV files?
  • Next by Date: Re: Binomial Distribution
  • Previous by thread: Re: faster sublist checking
  • Next by thread: Re: Re: faster sublist checking