This just again shows that given enough time skill, and resources, any security is pointless if the attacker has physical access to the device.
sparse_val = sparse[i]
return sparse_val < n && dense[sparse_val] == i
Regardless, we are treading in undefined territory, and the behaviour is not something that can be reliably be dependent upon