Hi,I've made the changes to the class as suggested but haven't posted them as yet.
but there is no need to rewrite the outer loop, is it?
for i=h to n-1
The inner loop, with the problem of the conditional And, could be written as
do while j>=h
if a(j-h)<=t then exit do
In my opinion, exit do should be avoided (when possible).