Closed taufiq closed 3 years ago
Hey taufiq,
You're absolutely right, to check if all elements in check_elements
are in elements
, the ==
operator works instead of the <=
operator. I think I wrote it that way because I learned that you should always write while i > 10
not while i != 10
in the impossible case that i
is incremented twice and since then I try to change ==
operations on integers to include corner cases with less than or greater than signs.
ahhh alright i see
Hey just read up on the LZSS implementation and I wanted to clarify the logic in the
elements_in_array
function. Link to pageThis is the function:
I was wondering why the
<=
operator was used forif len(check_elements) <= offset
. If you wanted to check if all the elements incheck_elements
are inelements
, wouldn't the==
operator suffice?